How to re-start an AUGraph() ?
How to re-start an AUGraph() ?
- Subject: How to re-start an AUGraph() ?
- From: Steve gfx <email@hidden>
- Date: Wed, 6 Oct 2010 21:30:37 +0100
I have a simple input AudioUnit which reads data from an audio file in memory during the callback. All is working fine except for when I stop and restart. When I stop (with AUGraphStop(graph)), and then restart it with AUGraphStart(graph), there seems to be about 50ms of sound missing at the beginning. This applies to all subsequent restarts. I've checked and re-checked the frame buffers and my packet index etc, and I've even done a dump of exactly what is getting written in my callback, and the exact same data is showing, but somewhere (at the rendering stage I guess) it's skipping samples at the beginning of the first buffers.
The only way I've found of curing it is to just completely rebuild the graph each time.
Is there some extra initialization that should be done before restarting an AUGraph?
Or should this work, and I've got an arithmetic error somewhere?
Thanks
Steve |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden