Re: Really puzzling ExtAudioFileRead crash...
Re: Really puzzling ExtAudioFileRead crash...
- Subject: Re: Really puzzling ExtAudioFileRead crash...
- From: "Stephan M. Bernsee" <email@hidden>
- Date: Mon, 7 Jan 2008 20:44:11 +0100
Hi Adrian,
yes, I guess it must be a bug in ReadPackets(). Several members have
emailed me on and off the list and told me that this is apparently a
known bug (#5565865). Noone from the CA team has responded to this
thread so far, so I can't be sure. I have filed a bug report on this
as well, so maybe this will help getting us some details as to when we
can expect a fix.
Anyway, I was hoping that the de-interleaving that you had proposed
would be a workaround but apparently not.
If I close the file, re-open it and seek to the new position at 26
seconds then it works for 26 more seconds, so I guess I could just
close the file every 25 seconds to work around this bug, but that is
really a dirty solution and I don't like it. Mostly because I have no
idea why it's 25 seconds and not some other number, and I can't be
sure that this is a constant across all file types and encodings...
Seeking alone doesn't seem to do the trick.
Anyway, thanks for your input so far,
Stephan
2008/1/7, Adrian Pflugshaupt <email@hidden>:
> Hi Stephan,
>
> You're right.. I now get the same crash :(
>
> So the difference must be something else. I'm writing a custom NSView
> to view audio files and there I'm able to read from the entire file
> with CAAudioFile which is really ExtAudioFile. So the difference must
> be something else. Right now I'm doing a lot of Seek() before reading
> blocks. Maybe that kinda resets the bug?
> My example basically reads chunks of audio from the entire file, but
> never 26 consecutive seconds.. so that might be it.
>
> Hm I now tried adding Seeks to you example (I know that's stupid..
but
> well..) .. and still get the same crash.
>
> So I don't know anything that could help you it seems. My last guess
> (for today) is that CAAudioFile does something you don't do?
>
> >
> > Hi Adrian,
> >
> > thank you for responding.
> >
> > So if I understand you correctly - what you're saying is that I am
> > not using the correct format in my ABL, or more specifically, I am
> > not allowed to use a single buffer with two channels in it when I
> > call ExtAudioFileRead()?
> >
> > I could not find anything in the documentation indicating that
> > channel interleaved data buffers are not allowed when reading from
> > an ExtAudioFile - could you please provide a reference for this?
> >
> > Also, I have rewritten the code to use a separate buffer for each
> > channel as you have suggested, but it does not seem to make a
> > difference. The crash after 26 seconds is still there, it just
> > happens a bit deeper down at the same place in the bowels of the CA
> > code...
> >
> > #0 0x91f62978 in MPEGAudioFile::ReadPackets
> > #1 0x91f6284c in MPEGAudioFile::ReadPackets
> > (..)
> > The modified code is at
> >
> > http://stephan.bernsee.com/ExtAudioFileReadTestNoninterleaved.zip
> > (47 kB)
> >
> > Btw. what your modification does is reading samples into the same
> > (overlapping) memory space, potentially overwriting buffer
> > boundaries in the process...!
> >
>
> I don't think so, but I admit it's a very nasty and didn't help at
> all :(
>
> Adrian
>
_______________________________________________
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