Sound loading time

View previous topic View next topic Go down

Sound loading time

Post  matt on Sun Nov 09, 2008 3:05 pm

I have an OGG music file with approx. 1.4 MB size. Loading it into memory with sio2StreamOpen on the device takes ~80ms, but decoding the pages with sio2SoundBufferLoad takes ~20000ms, which is unacceptable. Are there any options to improve this from what SIO2 offers?

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  sio2interactive on Sun Nov 09, 2008 3:22 pm

Double buffer should do the trick, that's also in my TODO list... i'll try to get to it pretty soon...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Sound loading time

Post  matt on Sun Nov 09, 2008 4:14 pm

Thanks alot. I'm getting closer to the deadline for my project. Do you have a roadmap what is to be expected within the next versions, and when?

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  sio2interactive on Sun Nov 09, 2008 4:19 pm

Yes I do have one, but it keep changing, my day job takes me alot of time, and I cannot spend as much time as I would like to on SIO2, so some features have to be delayed... Im really sorry about that Sad
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Sound loading time

Post  matt on Sat Nov 15, 2008 5:55 am

I know this day-job-problem too well ;-)

Still, I need to get the sound-stuff finished this weekend and need to find a solution. Did you make some progress with the loading speed improvement? Otherwise, I'd look for some other approaches. If someone is willing to share his experiences, I'd gladly read them.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  sio2interactive on Sat Nov 15, 2008 4:18 pm

No man... sorry... too busy to touch SIO2 theses days, however I see that one user on the forum post a code for loading CAF file, since this format is basically the .wav format from Apple, it should load pretty fast since there's no decompression. You might have a try to that one... lemme know how are the loading performance of CAF & OpenAL

Cheers,
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Sound loading time

Post  matt on Sat Nov 15, 2008 4:29 pm

I'm now trying to use Apple's AudioQueue API to play the background music, like shown e.g. in this posting, and use SIO2 for the little effect sounds. I'll let you guys know whether this works for me.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  matt on Sat Nov 15, 2008 9:02 pm

I remember from OpenAL programming on the PC that there was a limit on the possible number of sound sources (it was 32 in my case, IIRC). Does anyone know about such limits on the iPhone/iPod? I'm currently having the case that I load a number of files without problems and with others it's saying AL_INVALID_OPERATION and I'm investigating why that might be the case.

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  matt on Sun Nov 16, 2008 6:41 am

Hum, I tried the following on the iPod Touch 2G:

Code:
sio2InitAL();
ALCint val;
alcGetIntegerv( sio2->device, ALC_MONO_SOURCES, sizeof( ALCint ), &val );
This gives me 491343 as a result.

If I change sio2InitAL and explicitly request a number of mono sound sources, like so:
Code:
void sio2InitAL( void )
{
   static int attrlist[] = { ALC_MONO_SOURCES, 16, 0 };

   sio2->device = alcOpenDevice( NULL );
   sio2->context = alcCreateContext( sio2->device, attrlist );
I get 491355 as a result afterwards.

Anyone has an idea what's wrong here?

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Sound loading time

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum