Wav File Playback Not Working


devnull_foo_bar

Still Fresh
Joined
Jan 7, 2008
Messages
3
Hi,

n00b alert! Got an F200 for X-Mas and immediately fell in love with Ruckman. Hence I decided to have a look at Fenix. I'm amazed by how easy it is to pick up and what I managed to learn in one day. Unfortunately I seem to have hit a wall I can't take on my own.

It involves WAV file playback on the F200. It doesn't seem to work on my F200. I compiled a simple little program on my PC using fxc 0.93 that does nothing more than load a wav file and play it back continuously. It works great when I try it out with fxi on my PC.

Although the program starts and quits fine on my GP2X F200 I don't hear any sound! I downloaded the latest (ultimate) fxi for the GP2X with touchscreen support. Anyone an idea what I might be doing wrong? Am I missing something obvious? Thanks in advance for your suggestions!

Here's the code I'm wrote:

PROGRAM WAVTEST;

global
kick;

BEGIN
kick=load_wav("kick.wav");

if (kick == -1)
exit();
end

play_wav(kick, -1);

loop
if (key(_enter))
exit();
end
frame;
end

end
 
Is this the F200 sample frequency problem.. a few threads on this forum on the topic.
What sample rate is the wav file firstly.. try 22050Hz and see if that works..?
In fact try a few different frequencies - like 16000Hz 16500 Hz, etc
 
kevcal said:
Is this the F200 sample frequency problem.. a few threads on this forum on the topic.
What sample rate is the wav file firstly.. try 22050Hz and see if that works..?
In fact try a few different frequencies - like 16000Hz 16300 Hz, etc
Thanks for your reply, kevcal. I've tried 2 WAV files. They're both PCM WAV, 16-bit, mono. One is 22.050kHz, the other 44.100kHz. I guess it could be due to the fact that it's a mono file as 22050 and 44100 are very standard sample rates. I'll try some stereo files and different sample rates and I'll do a search on the forum for specific F200 sample rate problems. Thanks again!!
 
Last edited by a moderator:
I would guess if 22050 & 44100 rates don't work it may be something else.
Have you tried any other FENIX based games to see if samples work okay.
If they do, examine their Hz rates..??
 
yes, i don't know anything about fenxi code, but see if you can find a wav from another fenix game that works fine, and try loading that in your app.
 
mrsnature said:
yes, i don't know anything about fenxi code, but see if you can find a wav from another fenix game that works fine, and try loading that in your app.
Thanks. I think the problem must lie with the compiler i'm using. Ruckman is a Fenix game that runs fine on my F200. It has several mono 22.050 Hz WAVs. I tried playing one of them with my testprogram and it didn't work either. So either it's a problem with the runtime or the compiler I'm using and not specifically a F200 problem I suppose.

I did get ogg to work though, but it'd be nice to get a proper setup working. Thanks for the help so far!
 
Last edited by a moderator:
devnull_foo_bar said:
mrsnature said:
yes, i don't know anything about fenxi code, but see if you can find a wav from another fenix game that works fine, and try loading that in your app.
Thanks. I think the problem must lie with the compiler i'm using. Ruckman is a Fenix game that runs fine on my F200. It has several mono 22.050 Hz WAVs. I tried playing one of them with my testprogram and it didn't work either. So either it's a problem with the runtime or the compiler I'm using and not specifically a F200 problem I suppose.

I did get ogg to work though, but it'd be nice to get a proper setup working. Thanks for the help so far!


I'm unclear what frequencies do work. Is it 22050 Hz *mono* only? What about 22050 stereo? Are there safe frequencies? Should I save all my oggs as mono or stereo?

Also, is there a limit to song playback? I was trying to get a 1 minute ogg loop to work, but it seems to take forever to load. Is there a max file length or song length? And what's the difference between play_song and play_wav?

Thanks!
 
Last edited by a moderator:
I believe the following frequencies work on the F200 - I think the F100 supports more, but these should be enough:
8000
11025
16000
22050
32000
44100
48000 Hz
Samples can be mono or stereo - the channels are interleaved.

For more (than enough) info: http://www.gp32x.de/board/index.php?showt...=40007&st=0
 
Last edited by a moderator:
kevcal said:
I believe the following frequencies work on the F200 - I think the F100 supports more, but these should be enough:
8000
11025
16000
22050
32000
44100
48000 Hz
Samples can be mono or stereo - the channels are interleaved.

For more (than enough) info: http://www.gp32x.de/board/index.php?showt...=40007&st=0



I've been sticking with 22050 mono/stereo on my GP2x, it seems pretty safe so far...
 
Last edited by a moderator:
Back
Top