forked from mtwteam/BackgroundMusic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix audio distortion after reactivating the device.
After deactivating and reactivating the device, the audio from the device's input stream was sometimes distorted for a short time. The problem was that the host doesn't always call our StopIO function for every client when the device is deactivated. That stopped BGM_Device from resetting the timeline of the timestamps it returns from BGM_Driver::GetZeroTimeStamp. The timestamps would have host times far in the past and that made the host try to catch up by skipping over some samples. The fix is to reset the client data when the device is activated, which ensures that it will reset the timestamps (i.e. the loopback clock). Also, change the driver's UUID in Info.plist so it's not the same as the one Background Music uses. As far as I know, that just stops coreaudiod from logging a warning about it.
- Loading branch information
1 parent
7041bc9
commit 533b66d
Showing
9 changed files
with
209 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.