Fix the bug where handles would remain open after a USB connection
commit86b2af7e546aa8b1e2343172c220e857328a235a
authorNicolas Pennequin <nicolas@nicolas-laptop.(none)>
Tue, 23 Oct 2007 20:10:33 +0000 (23 22:10 +0200)
committerlearman <learman@a1c6a512-1295-4272-9138-f99709370657>
Thu, 25 Oct 2007 19:18:20 +0000 (25 19:18 +0000)
tree9334583cc5d408ee5f4b7e0aaec028a21c9de3ba
parentc239dbb6cdad34e7750ded03a37d6d98e5244bcb
Fix the bug where handles would remain open after a USB connection

* Change bufclose and close_handle so that they return true (nonzero) on
  success and false on failure. This is to be consistent with the fact that
  the default reply for a queue message is 0.
* Make clear_track_info() return a boolean too, and make it erase the track
  info struct only on success of all the bufclose calls. That way we can
  try closing them again later.
* Call audio_release_tracks on USB disconnect, to ensure proper closing
  of all handles.
apps/buffering.c
apps/buffering.h
apps/playback.c