Sound problems with SVN max

BlitzMax Forums/BlitzMax Programming/Sound problems with SVN max

I've downloaded the SVN version of BlitzMax and am experiencing problems with my ogg files. Every sound is getting distorted using FreeAudio or OpenAl. If I switch back to 1.30 it works fine.

Any ideas?

What kind of distortion? Skipping?

No, it's playing ok time-wise. But every sample and the music is accompanied by a distorted buzzing noise...

http://download.newstargames.com/misc/SoundProbs.wma

I tried copying the following modules from the official version into the SVN version and rebuilt, but the problem persists...

brl.audio
brl.audiosample
brl.directsoundaudio
brl.freeaudioaudio
brl.oggloader
brl.openalaudio
pub.freeaudio
pub.openal

I've just installed the SVN mods (brl and pub) on XP, built, and ran a small test (wav and ogg). Audio is fine here.

Hmm, that was with the default FreeAudio driver.
However, if I try SetAudioDriver("FreeAudio DirectSound") I get the same issues as you.... interesting.

It appears to be a problem with the buffer in with directsound. If I increase the buffer size, the "ticks" come less often.

I haven't tried openal yet.
My 3 audio mods play okay (irrKlang indicates it is using directsound8)

Brucey, is it possible that I can revert to 1.30 and just update the mods that have changed to include your Unicode filepath support? If so which mods would it be?

Yeah, I have a zip with *just* the files I changed... but I'm at work now, so I can't get them to you til later...

The zip here has full modules, which you might want to try, but it's not the latest-latest version.

This is strange, I tried the zip and rebuilt all but now when I do this:
Local ini:TStream=OpenFile("ToDo.txt")
If Not ini Notify("Could not open file") Else Notify("Found file")

I get "Could not open file" when running from Blide or MaxIDE but if I run the resulting exe it works fine.

Also if I put the full file path it works ok either way.

In blitz_app.c (in brl.mod/blitz.mod) at the end of the bbStartup() function, you will see this :
	chdir( app_dir );

it wants to be this :
#ifdef _WIN32
	_wchdir( app_dir );
#else
	chdir( app_dir );
#endif


The "bug" is because the current directory is not being set when the app starts.
Like I said, that's not the latest-latest version ;-)

Ah cool. I'll wait patiently then. :)

Are the sounds working okay with this patch running on 1.30?

At first I thought they were then I started getting that noise again. I'm not sure where it went wrong again so I'm doing a fresh install and repeating the process...