Re: OpenAL and file size
Re: OpenAL and file size
- Subject: Re: OpenAL and file size
- From: Chunk 1978 <email@hidden>
- Date: Sun, 31 Jan 2010 13:48:33 -0500
well, currently i'm building a general sound engine / studying OpenAL
for the iPhone, so nothing i plan on publishing. right now i'm
playing with pitch using a slider, so what i'm trying to do is load a
large sound file (an entire song) into my testing app and change it's
pitch. it works on smaller file sizes, but loading the large files is
crashing my app.
i'm under the impression that i currently am using extended audio file
to read the file's data. can you confirm based on the .m that was
attached in my previous post?
On Sun, Jan 31, 2010 at 1:36 PM, David Duncan <email@hidden> wrote:
> On Jan 31, 2010, at 9:46 AM, Chunk 1978 wrote:
>
>> yes, i do need to process the file so that is why i can't use AVAudioPlayer.
>
> What do you need to do with the file?
>
>> i've read memory warnings can execute at only 3MB of allocated space.
>
> Memory warnings will occur when they occur, there is no guildeline at where they will occur because they are a system wide event and you have no control over the entire system.
>
>> as a test i cropped the .MP3 file down to a 30 second sample and
>> converted it to .caf (the file loads on device quickly but is now
>> actually 6.5MB uncompressed .caf). previously i simply converted the
>> entire .mp3 into an uncompressed .caf but it was a very large file and
>> would also crash the app.
>
> Yes, as you guessed the decompressed size is what matters (it usually is).
>
>> so i think what you are saying is that if i wanted to play the entire
>> file, i have to load one section at a time and deallocate the first
>> piece before loading and playing the second section? are there
>> general guidelines with loading sounds files with OpenAL on the
>> iPhone? a file size or length i should not surpass?
>
> You would generally reuse the same buffer, but in effect yes, you need to control how much memory you use. In general, file size is not your limiter, but how much memory you use in your application.
>
> Without knowing what you are trying to do, it is unlikely that there is much that anyone can offer aside from what I have already said - use Extended Audio file to read the file piecemeal.
> --
> Reality is what, when you stop believing in it, doesn't go away.
> Failure is not an option. It is a privilege reserved for those who try.
>
> David Duncan
>
>
_______________________________________________
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