This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Game Audio APIs


Game Audio APIs

Postby Digby » May 26, 2001 @ 7:19pm

What are you guys using for audio in your games?  <br><br>I spent a little time this weekend futzing around with the waveOut APIs.  I suppose that's what you would have to use for mixing multiple wave files since DirectSound isn't available.  <br><br>Any other alternatives?<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Game Audio APIs

Postby suchiaruzu » May 26, 2001 @ 7:28pm

Jaybot said he used S3M and XM or something...<br><br>[center]Hooray, Post # 500 in this Forum![/center]
<div align="center">Image<br></div>
User avatar
suchiaruzu
pm Insider
 
Posts: 2570
Joined: May 3, 2001 @ 9:29am
Location: BFE


Re: Game Audio APIs

Postby Dan East » May 26, 2001 @ 11:18pm

That's right, you have to use the waveOut family. It's not terribly fun programming either. If you just need rudimentary sound capability, like playing a single sample at a time, you can use the sndPlaySound function for simplicity.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Game Audio APIs

Postby Jaybot » May 27, 2001 @ 6:50am

Um, I'm just a lowly sound engineer and composer, not a programmer anymore :); but from what I've gathered from various programmers.. becuase of the obvious lack of on board sound hardware, many programmers/developers who want to use music in their games are using a MOD file decoder/player, which can cover any of the mod formats xm, s3m, it, or mod, becuase of the ability to embed the instrument samples in the file.  Some programming teams, such as brain drain (short story I don't want to tell), have asked to only write using 4 channels (which I might add, 4 channels is a total bitch btw, custom samples of different chords for same instruments.. if you know music stuff..) to leave plenty of room for SFX channels.  On the other hand, Peter Balogh has only requested that I don't exceed eight sound channels, which is fine by me (only prob is trying to keep the samples low by compression without losing sound quality, for a samller file size); I believe I read (or heard?) somewhere that the PPC has something like 16 open sound channels using a method like this, while using normal wav files for SFX.<br>Then again, Fredrik Malmer (weeboo and argentum author), is sticking to mixing only plain wav files (not PCM), a short looped wav file for music, and other wavs mixed in for SFX.<br><br>I hope that cleared something up.  If not, ignore everything I wrote above and pretend it never happened :)
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Game Audio APIs

Postby Digby » May 27, 2001 @ 2:30pm

Jay,<br><br>Thanks for your perspective.<br><br>You wrote:<br>>>Then again, Fredrik Malmer (weeboo and argentum author), is sticking to mixing only plain wav files (not PCM), a short looped wav file for music, and other wavs mixed in for SFX. <br><br>From all I know, plain wav files are PCM encoded, with the addition of a RIFF header.  Can you clarify a bit?  Maybe I'm missing something.<br><br>Querying the hardware in my iPaq shows that there is a single output device with only 2 channels (stereo).  If you want to play multiple sounds simultaneously, that means software mixing.  That is what I'm playing around with now.  My software must combine the PCM data from multiple buffers and then write those to the hardware using waveOutWrite.  If you have docs on these reported 16 channels of audio on a PPC, then pass them along.  I'm definitely interested.<br><br>I have no idea what XM, SM3, or MOD players are, but since the hardware can only play PCM data from a buffer, they would end up doing something similar to what I'm doing anyway.  My iPaq only seems to support uncompressed, raw PCM data so any decompression would be done in software.<br><br>Anyway, thanks for the response.  It's good to hear from people who have experience from the "content" side of the game development process.<br><br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Game Audio APIs

Postby CARPEDIEM » May 27, 2001 @ 3:20pm

You can add support for mod audio files with a lib called MikMod which i think you can get from http://www.xsolution-online.de/<br>the nice thing about mod files is that their file size is very small. I was going to use it in Argentum but it was kind of slow on my E-125, Jacco Bikker says it runs just fine on an Ipaq.<br>
CARPEDIEM
pm Insider
 
Posts: 514
Joined: Feb 24, 2001 @ 3:58pm


Re: Game Audio APIs

Postby Jaybot » May 27, 2001 @ 6:47pm

The PCM thing was just something that Fredrik Mentioned in a Chat..let's see, "Fredrik Malmer: (4:26 PM) remember not to use PCM or something. Has to be plain wave<br>Fredrik Malmer: (4:26 PM) and you should run your files through this app (StripWAV), that removes stuff some codecs add"<br><br>I'm not sure if that's exactly what he meant, because he did say 'or something' maybe he can clear that up.<br><br>As for the 16 sound channels.. I'm not sure exactly where I heard that.. it's possible it might have been the sound mixing software that BD was using for G-Prime.
-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Re: Game Audio APIs

Postby Digby » May 27, 2001 @ 9:00pm

Carpe,<br><br>I'll check out that link - thanks.  I'm going to work strictly with PCM data though.  It's a level that I'm comfortable with.  Sounds like MOD files are similar to MIDI, in that note info is stored in the file and the library has the PCM data (or whatever it takes) to play.<br><br>Jay,<br><br>Perhaps he made a slip and really meant ADPCM?  I might investigate using simple compression on the wav data, by encoding relative sample position rather than absolutes, then quantizing these steps using a 16-entry lookup table.  I think I could decode this pretty quickly when the hardware buffer is loaded, but if it's slow I'm going to dump it.<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Game Audio APIs

Postby Malmer » May 28, 2001 @ 4:38am

Yes, I ment ADPCM...sorry for the confusion...As for "stripwav" it is a utility that removes the extra stuff some codecs add to the wave file, such as icons and descriptions. The wave-file reader is based on sourcecode from microsoft, and somehow it doesn't support that stuff in the wave file. The fun part is that Microsoft Codecs add the extra stuff!<br><br>// Fredrik<br>
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Game Audio APIs

Postby Digby » May 28, 2001 @ 12:04pm

From what I gather about ADPCM, the "extra stuff" in the encoded wav file include the coefficients necessary to describe the base waveform for the adaptive compression.  <br><br>I'm not really clear on why you would have extra info for a normal run-of-the-mill PCM-encoded wav file.  Perhaps some audio tools allow you to add composer information or some such?<br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: Game Audio APIs

Postby Malmer » May 28, 2001 @ 1:24pm

A normal plain PCM file COULD contain stuff like a special icon for the wave file and who the author is, a describtion etc...<br><br>// Fredrik
All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Re: Game Audio APIs

Postby Phantom » May 30, 2001 @ 10:13am

Hey,<br><br>MikMod is indeed for playing sound and music. If you want to use it, keep in mind the following:<br>1. Use .MOD files. Those are only 4 channels, wich saves a lot of mixing.<br>2. Alter the MikMod sources; take out the volume stuff. This saves a multiply for every sample in every channel, this reduced the processor load of MikMod to less than 10% when running at 30fps on my iPaq (wich still means that an E-125 game running at 100 fps would spend almost all it's time in MikMod...)<br><br>But, it saves you a lot of hassle. And it sounds great.<br><br>- Jacco.
Phantom
 


Re: Game Audio APIs

Postby Moose or Chuck » May 30, 2001 @ 12:11pm

Moose or Chuck
 


Re: Game Audio APIs

Postby Diego Cueva » May 30, 2001 @ 12:56pm

--------------------------

Last modification: Diego Cueva - 04/31/03 at 17:32:04
I´m currently listening to my PC´s fan
SMRF founder
Peace
User avatar
Diego Cueva
pm Insider
 
Posts: 2582
Joined: Mar 28, 2001 @ 9:06pm
Location: D.I.G. Secret Headquarters, Brazil


Re: Game Audio APIs

Postby Jaybot » May 30, 2001 @ 9:40pm

-------
|\\ //|
-- ^ --
|||
User avatar
Jaybot
pm Insider
 
Posts: 3208
Joined: Mar 22, 2001 @ 10:04pm
Location: Desk.


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron