Results 1 to 6 of 6

Thread: Sound library comparison specs

  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45

    Sound library comparison specs

    Fiddling with some code (again) and I found that some of my advancements in 'technology' mean that in order to play a 1min49sec (1.8MiB) Ogg file, my program will use 20.02mb of memory. I don't know what the standard here is, but would anyone deem that acceptable?

    ps: The ogg file is 44.1khz, 128kb/s played back at 22.05khz in 16bit (2 channels).

    Just a thought. Please don't take this as a competition/challenge for all you OpenAl dudes/dudettes who will go out and come back with the same result in 250kb
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    Quote Originally Posted by code_glitch
    I don't know what the standard here is, but would anyone deem that acceptable?
    No. My library will use only 64Kb(size of buffer) for streaming audio file. And yours seems just decode Ogg file into PCM and play it, this is not a good idea to play the music

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    I thought so. The thought was driving me insane and led me to post this. The dilemma is simple: support as many possible formats. Thus, my solution was sdl_mixer. However, it only has a 'stream' mode as Sdl_Mus which can only play back one file at a time. The only alternative is chunk: which loads it all into RAM. Would there be anyway to have Sdl 'stream' data from disk to chunk for playing?

    Or better - could sdl decode the file and then stream it to OpenAl? However, I can never get OpenAl to play more than one file at a time so it sort of defeats the benefit of using chunk in the first place.

    cheers,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    I don't entirely understand your issue. You want to play multiple music files (ogg/mp3) simultaniously? Why would you want to do that?

    I simply want to support OGG (and maybe also MP3) in my code. Being able to play a single music file and multiple WAV soundeffects seem perfectly sufficient for game development. Also, I dont think it's worthwile to support a lot of music formats. Most games dont have an awefull lot of music so it's not a problem to convert all content to the right format.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Multiple music files, and multiple audio files at once are two entirely different issues. I apologise if I was unclear earlier - but I meant audio files in general. The reason being that I would like to have support for a simple remixing app along with the ability to stream multiple files at once - since it could be a unique app. Also, the issue I have trouble with is that whatever I try I can never get OpenAl to play two audio files at the same time. Every attempt one cuts out as the other starts. Frustrating.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  6. #6
    Hmm... I think playing two audio files in openal is quite easy. OpenAL just works with buffers and sources, with wich you can play things simultaniously. The hardest part is getting the data into the buffers without any hickups i guess (in case of streaming audio). Playing should go perfectly well.

    Are you able to play 2 wave files simultaniously? Or is your problem time-related (you want to start playing both at exactly the same time)?
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL