Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: [1] 2

Author Topic: Audio/Video Codecs Status  (Read 4337 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« on: April 09, 2006, 10:02:04 PM »

Ogg 80% Done - Need to add ptypes for threading
Vorbis 50% - Header Checks are done
Theora 50% - Header Checks are done

Wav 0% - Not In Work yet
Flac 0% - Not In Work until later

Everything, will still be compilable, before I commit, I am commenting out undone code.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Audio/Video Codecs Status
« Reply #1 on: April 13, 2006, 10:36:08 PM »

Ogg 90% Done
Vorbis 95% - Some crackling during playback
Theora 50% - Header Checks are done, decoding done, frame blit not done

Wav 0% - Not In Work yet
Flac 0% - Not In Work until later

Anyway, audio now plays out of the sound card.. But, there is often lot's of distortion, still needs much work.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #2 on: April 14, 2006, 09:09:11 AM »

In light of distortion problems with openAL - i added an additional Fmod SoundSytem module. This is using Fmod 3.75 API. It can be downloaded from fmod.org and added to the IDE project settings, as it is not really a hardcoded dependency like the others (Ogre, Ogg, vorbis, OIS, etc) - it will not be included in the depend's download.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Audio/Video Codecs Status
« Reply #3 on: April 14, 2006, 10:09:49 AM »

Ogg 95% Done (Need to add Ogg Flac - later, and get video stream working now)
Vorbis 97% - Fix any bugs, optimise
Theora 80% - Header Checks are done, decoding done, frame blit not done

Wav 0% - Not In Work yet
Flac 0% - Not In Work until later

I added some media clips to the ringo media, and play some sound now in the scripts! both OpenAL and Fmod test good! Room for improvement, and other things. but, this is a big step.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #4 on: April 14, 2006, 06:38:42 PM »

The wave decoding is now going to be in work, the other codecs (Theora, etc) will have to wait. As, I am a little burned out with audio/video, and it is tedious and not very fun :D

Anyway, wave is important for light weight sound playback for effects.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Audio/Video Codecs Status
« Reply #5 on: April 14, 2006, 08:36:39 PM »

Wav 50% Done..

Decoder is in place. Just need to fill in Audio Sample Data (PCM) to the SoundSystem's Audio clip member. Also, another thought occured to me, I think that for 3d position sounds, samples need to be mono. Well, it is possible for the wave decoder to convert, this would however, mean tat there would be an additional flag (bool mono) to the play method.

And, streams will not be converted to mono, only samples (Wav's).
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Audio/Video Codecs Status
« Reply #6 on: April 14, 2006, 09:31:12 PM »

Are wavs the only format that are allowed to be samples? I know I would probably want to use Oggs for SoundFx, and voice clips, because Wavs get really large, really fast. I think it would be cool to have music coming out of a stereo with positional sound  :wink:
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #7 on: April 15, 2006, 07:50:20 AM »

As far as I am aware, streams (at least in Fmod) cannot have position sound. I could be wrong. Plus, at least in Fmod (IIRC) the sound also has to be mono for positioning to work/sound right. I can convert a wave file to mono on the fly, but a stream would be overly complex. Though, this could be a possibility.

In any case, that overly complicates the stream code. You can still play a ogg file in response to something. However, the most efficient way (fastest/quickest/less resource hogging) has always been using wav files for samples less than 30 seconds - meaning, most all soundfx's. And stream for background music. This is just how it is done :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #8 on: April 15, 2006, 11:18:03 AM »

I've committed the intial wave decoding. But, I have realized that it only plays some waves files correctly.

It apparently has some issues with cutting the frequency in half, and playing short. Still needs some work. The sample code I based it off of has the same issue, so at least I did not introduce the error :)

Anyway, if anyone has any links to some sample wave decoding code, feel free to post, so as I can compare and see where the problem is. I could be reading in the freq wrong, that would make an invalid playback though.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Audio/Video Codecs Status
« Reply #9 on: April 15, 2006, 07:10:47 PM »

I don't know if this is the tutorial you are using, but I found a Wav decoding tutorial on gamedev. http://www.gamedev.net/reference/articles/article709.asp Hopefully this can help you, I haven't tried it yet. If you are simply looking for more refrences, I have some that I found while looking before. Just post if you need them  :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #10 on: April 15, 2006, 08:58:33 PM »

Thanks, that linked helped a lot.. I already had all the loading code (mostly right), and that link gave me a confirmation of that.

It was a matter of loading short/byte I was using the wrong size. Now, all is fixed... All wave's ( I only have window's wav files atm ;) ) worked fine. I have tested Play with looping and without. Works good.

Mono conversion needs testing, and setPause is not implemented, but yay!!! Waves are playing :D
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #11 on: April 15, 2006, 08:59:45 PM »

Oh, and only 16Bit audio wav's are supported at the moment. A error pop's up if you try to load 8Bit clips (and if you try to load compressed waves).
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Audio/Video Codecs Status
« Reply #12 on: April 15, 2006, 09:30:18 PM »

Sweet  :D , now we get to hear pjcast's beautiful singing voice in crisp, uncompressed wav sound right?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #13 on: April 15, 2006, 09:33:56 PM »

Yuppers.. I will be the next american idol !!

Not really :)
I just added setPause, didn't test it, but it should work fine. Only OpenALSoundSystem is set to work with waves at the moment. Fmod will have to wait... It is a real simple change, but I don't have the time at the moment.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Audio/Video Codecs Status
« Reply #14 on: April 16, 2006, 10:14:32 AM »

Ok, while I was searching for a simple sound fx to add to Ringo media, I found it hard to search for a 16 Bit wave sample.. Most are coming in 8Bit. i could convert one I found, or make my own. However, i think before I add any sample clips, I will add support for 8Bit audio. All that entails is the way the sample data is loaded.

Will be done by tuesday.
Logged
Pages: [1] 2