PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Sound mixer, first test

Hello all.

With permission from Johan, I am posting this message inviting anyone interested to give me a hand to test my sound mixer.

In this first test I include a Windows and ARM executable. As soon as I have a few feedbacks on it, I'll provide the DLL with some samples and documentation.

Here is the link to the test:

http://www.techlogic.ca/aw/gapisound.exe
(1.6 MB, self-extracting, tested)

Oh, and guess what? It's called GapiSound ;)

Ok, here are some instructions: run the file and extract its content anywhere on your harddrive. Go into the PC > PC_Test > Release directory, and run "Test.exe".

For your ARM based PocketPC, copy the PPC directory anywhere on your device, and run "Test.exe".

Here are the expected results: A basic application will start, after which you will hear a Duke Nukem babe say: "I'm all yours, Duke!". You will then hear Duke himself say: "So many babes, so little time!". Then music will start and a guy will speak on top of the music.

These four sounds are different format: ADPCM compression, OGG Vorbis compression, .IT module and PCM wave data. They are also at different rates. The mixer is set to 44100 hz, 16 bits, stereo.

Please report your results to me at efortier@techlogic.ca , here is what I need to know:

- Did the Windows version work? Was there any stutter or skips? Were the four sounds played?

- What is your PC sound card? (if known)

- Did the ARM PocketPC version works? Was there any stutter or skips? Were the four sounds played?

- Was the PocketPC application window with the words "LET'S ROCK!" properly shown?

- What is the brand and model number the PocketPC(s) device(s) you did the test on? (important)

For this test I used a fixed buffer count and size for the mixer, so if your device has a high sound letency it's possible that there will be some skips. This can usually be fixed by increasing the number or size of the buffers.

Here are some technical information on the mixer itself.

The mixer and IMA ADPCM code is all my own. Included is a mod player that can play .MOD, .IT, .XM. The mixer loader can load PCM, IMA ADPCM and OGG/Vorbis compressed sounds. It can either run with a built-in thread to mix the sounds continually, or you can include the "Mix()" function in your main loop.

The mixer also contains a streaming feature to let you play sounds without loading them all into memory. The mixer supports 11/22/44 Khz, 16/8 bits, mono/stereo. While "floats" are used to set the volume of the sounds and modules, these are converted into integers and no floats are used anywhere else in the mixer.

The OGG/Vorbis part is the Tremor v1.0 integer OGG implementation that can read (not write) any OGG encoded file. It provides compression comparable to MP3, without need for licensing.

The IMA ADPCM compression allows the use of 4 bits compressed sounds which also produce small file sizes.

The mixer features a "sound injection" feature neccessary for games. It lets the programmer load a sound once, and inject it any number of times into the mixer, even if the sounds overlaps itself.

There is no limit to the number of sounds that can be played simultaneously, however the more sounds playing, the larger the buffers and the more CPU power will be required to mix the sounds. On a 206 Mhz device, I have no problems playing 4-6 sounds at the same time, while keeping a good framerate.

The mixer uses standard waveOut() functions, and I've been careful in its implementation. So there shouldn't be too much problems in that area. (I hope!)

That's about it for now. I look forward to your comments, and if any of you have suggestions, please write them in this thread.

Thanks!

--Eric Fortier

PS: The mixer should also work correctly after you turn the device off then on ;)
summer_goth · 08 May 2003, 20:50 UTC
Very cool! I am glad someone has had the initiative to create a sound library.

Downloading it right now.
Works on my Dell Workstation and Dell Axim X5.

No skips or stutters, but there's a longer delay on the Axim before it plays, which I assume is caused by it loading the sounds off the SD card.

There's no mention of looping the audio, but I noticed the music loops. Does it keep the file in memory and just reset the pointer to the beginning of the sound if a "looping parameter" is set to true, or does it have to be looped manually? An infinitely looping audio file (with a seamless transition) would be good addition to the test.

The quality of the audio is perfect. Keep it up.

-John
Hi Presto!

Yes, loading from an SD card will take slightly longer.

Yes, you can loop the sounds. I'll add that in the full demo once I'm done with the current tests.

The music is not a wave, it's an IntuiTracker module fully loaded into memory. You could have a wave or OGG file played through streaming that would also loop.

Thanks for trying it!

--Eric
warmi · 09 May 2003, 04:08 UTC — test
The test.exe worked fine on ipaq 3835 as well, aside from the fact that I had to search for some sort of unrar :-)
Sorry about that. I now turned that into a self extracting exe. Thanks for the infos!

--Eric
Very cool.

What are your plans for distribution?
It was OK on IPAQ 3850. Also tested on an IBM notebook with Crystal Soundfusion soundcard and an IBM Netvista desktop with a motherboard-integrated SoundMAX soundboard and both were perfect. Looking forward to the final release...
I'm still not certain.

I may provide it free of charge for personal and shareware use, and charge a fee for commercial use.

What would you think about this kind of license?

--Eric
As soon as I get my Pocket Loox back from the repair centre I will check it.

I know there is a Casio that has troubles with MikMod if it's 'update' function isn't called enough. Maybe that could be tested also?

Maurice
Hi,

maurice wrote:I know there is a Casio that has troubles with MikMod if it's 'update' function isn't called enough. Maybe that could be tested also?

This is why I included an .IT module in the test program. It uses MikMod with a custom driver for the mixer. This should give a good test to the player.

Thanks!

--Eric
can't resist to test it on my smartphone :)
both 2 first sounds are ok (but need long time to load) The big wav and the IT don't play at all, or maybe it takes AGES to load :) i dont know...

EDIT
- the IT play really well (with a great sound quality !) if I remove the big wav file (so I guess that the loading is very long, or there is a memory problem, i can't say) (french orange SPV smartphone)

- The words LET'S ROCK appear, but as the phone don't have mouse nor stylus, I can't get out of the app :)

- on my DELL laptop, moving or resizing the windows seems to add some noises in the sounds (sorry, can't explain better...)
stuff wrote:can't resist to test it on my smartphone :)
both 2 first sounds are ok (but need long time to load) The big wav and the IT don't play at all, or maybe it takes AGES to load :) i dont know...

It works on a Smartphone !?? [shock and awe (tm)]

The reason for the long load time is probably due to the fact that the first two sounds are compressed. One with OGG vorbis, the other with ADPCM.

In the next demo I will make sure there are options for smaller sounds and changing the mixer settings. This way it should make it easier to test on Smartphone.


- on my DELL laptop, moving or resizing the windows seems to add some noises in the sounds (sorry, can't explain better...)

That's not surprising. It depends on the version of Windows, cpu, etc, since it uses a thread to mix. When you select the window and move it around, something mysterious (probably esoteric in nature) must happen to the threads and priority and the mixer chokes. Same thing should happen if you minimize and work on other things.

This is most inspiring. I'll see what I can do about these issues, thanks for testing it!

--Eric
efortier wrote:
I'm still not certain.

I may provide it free of charge for personal and shareware use, and charge a fee for commercial use.

What would you think about this kind of license?

--Eric


Sounds fair to me, though you might have to clarify what shareware is as some developers think an unlockable demo is shareware, where as others think of that as commercial.

Any thoughts on how much the license would be?
Commercial games, to me, is Everquest, Hyperspace delivery boy, etc. Big names. People in this category usually have a publisher, or work for a known company, be it Sony, Monkeystone, EA, or the Bitmap Brothers.

Shareware games are the smaller ones, you know, the miriad of puzzle and tiles games out there. Those produced with a lot less budget. People in this category usually publish the game themselves.

Since commercial developers expect their game to perform, their tools to have better support and probably want to target lots of platforms, it makes sense to charge a modest fee. Also, if you are developing a game for Sony, you can afford to buy a mixer. Everquest use Fmod, which isn't cheap at $1250 per product per platform.

Still, I'm just thinking out loud. The mixer is not ready yet, even if I didn't receive a single bug report, except those minor issues Stuff reported above! Not bad for a first test, huh?

--Eric
yes its works on smartphone, because they have ARM cpu and run under winCE 3.0 :D
For tests, you should add an "exit" fonction, using one soft key for exemple.
Free for shareware games ?? :D Do that and I'll switch from fmodCE to GapiSound :)
stuff wrote:For tests, you should add an "exit" fonction, using one soft key for exemple.

Do you mean one of the button GapiDraw supports using the CGapiInput class?

I never looked at the Smartphone SDK, but I will! ;)

Free for shareware games ?? :D Do that and I'll switch from fmodCE to GapiSound :)

What feature of FMod do you use/would like to have?

Is emulator support important to you?

Thanks!

--Eric
im using wav and xm playback (because im using the "light" version of fmodCE with only xm and wav playback, but with a smaller size than the full version)
Emulator is not very important for me, i'm only using it for debugging, then, i don't really care if the sound is not played.