Why a simple aif file doesn't play?
Why a simple aif file doesn't play?
- Subject: Why a simple aif file doesn't play?
- From: Gabriele Palmas <email@hidden>
- Date: Tue, 10 Feb 2009 11:57:11 -0500
Hi all,
I have a problem that I cannot figure out. I have a simple
aif file; ss soon as the file start to get queuing in the buffer here
is the result:
Queuing buffer 16000 for playback
Loading program into debugger…GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
..... [omitted]
(gdb)
Again any suggestions?
Here is is my playback function:
- (void)startPlayback
{
playState.currentPacket = 0;
[self setupAudioFormat:&playState.dataFormat];
OSStatus status;
status = AudioFileOpenURL(fileURL, 0x01, kAudioFileAIFFType, &playState.audioFile);
if(status == 0) {
status = AudioQueueNewOutput(&playState.dataFormat,
AudioOutputCallback,
&playState,
CFRunLoopGetCurrent(),
kCFRunLoopCommonModes,
0,
&playState.queue);
if(status == 0){
playState.playing = true;
for(int i = 0; i < NUM_BUFFERS && playState.playing; i++){
if(playState.playing){
AudioQueueAllocateBuffer(playState.queue, 16000, &playState.buffers[i]);
AudioOutputCallback(&playState, playState.queue, playState.buffers[i]);
}
}
if(playState.playing){
status = AudioQueueStart(playState.queue, NULL);
if(status == 0){
labelStatus.text = @"Playing";
}
}
}
}
if(status != 0){
[self stopPlayback];
labelStatus.text = @"Play failed";
}
}
I start thinking that I have some misconception!
Thank you.
Gabriele
_______________________________________________
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