Multiple play
Multiple play
- Subject: Multiple play
- From: Luca Filippin <email@hidden>
- Date: Thu, 11 Nov 2004 19:11:42 +0100 (CET)
Here are some questions I would like to have an answer.
1. What should I do when a file has been played once, when I have played
it once. Should the audioConverter be reinitialized again? WHy?
Here is what we do now:
- we load the file
- we set the call back procedure
- we create the converter.
When I play the file, I read data from memory into a buffer and pass the
samples to coreaudio. When the sound is finished, the procedure gives back
0, and this gives to the audiooutput unit the end of sound signal.
When I want to start again the same sound, intuitively I should need to
do only AudioOutputUnitStart after we reset the input data offset.
However, that is not sufficient. No sound is played. Why? Do I
necessarily have to create a new converter, or reset it? I need to
avoid this because it is time-consuming.
Is there any other way to stop audio data output unit other than the
function call AudioUnitStop that is very time-consuming?
I know that forcing the data feeding callback to return 0 will work, but
this solution may introduce a delay from when I force this to when the
Audio Unit will really stop. This delay could be of several milliseconds
and I need a great accuracy on the stop instant.
Thanks,
Luca
_______________________________________________
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