[Gambas-user] gb.sdl.sound
Ron
ron at ...1740...
Sat Sep 20 13:30:59 CEST 2008
François schreef:
> Le Saturday 20 September 2008 12:31:29 Ron, vous avez écrit :
>
>> Hi,
>>
>> I have added the gb.sdl.sound component to my program.
>>
>> My program runs for a short time and then gambas crashes with signal 11,
>> what was the correct way to get useful info out of the core files it
>> dumped?
>> I cannot find it...
>>
>> Music.Load() failes to load _any file_ I supply.
>>
>> Error: "Unable to load WAV file" not very informative...
>>
>> My pulseaudio setup could be the problem maybe, but getting something
>> from the core files would be nice.
>>
>> Thanks.
>> Ron_2nd.
>>
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge Build the coolest Linux based applications with Moblin SDK & win
>> great prizes Grand prize is a trip for two to an Open Source event anywhere
>> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
> It's a problem with your linux distribution, not with the gb.sdl.sound
> component because i use this component for one of my projects (and it runs
> very good :) ) .
>
> Did you have installed the good packages to play .WAV file ?
> What is your linux distribution ?
>
> Maybe the problem come from pulseaudio server... But i find that strange.
>
>
Hi,
Look at my last post, if gambas sdl component cannot connect/open the
audio device when it inits the sound engine, loading of all audio files
failes.
(Music.Load)
This look like a bug in the component to me.
If start my pulseaudio environment correctly before starting gambas
program all loading and playing is ok, exept for a /dev/sequencer error
not found.
Commands like 'play' and 'swift' (cepstral TTS) are loading files
normally, but give the error that the cannot connect to pulseaudio (in
fact it's pulseaudio client giving this error)
This is the only sdl related code I have now:
PUBLIC FUNCTION PlaySnd(sFile AS String, OPTIONAL iVol AS Integer)
DIM iVolume AS Float
DIM sSnd AS String
IF NOT Main.bSoundEnabled THEN RETURN ' sound not enabled
sSnd = sDefaultSoundDirectory &/ sFile
IF ivol THEN ' custom volume
iVolume = 1 - iVol / 100
ELSE ' default volume
iVolume = 1 - Main.iSoundVolume / 100
ENDIF
IF Exist(sSnd) THEN
' load sample
Music.Load(sSnd)
Music.Volume = iVolume
IF Main.bSoundDebug THEN Main.WriteDebugLog("[Sound] Volume is set
to " & iVolume)
' play sample
Music.Play()
ELSE
Main.WriteDebugLog("[Sound] The soundfile " & sSnd & " doesn't exist!")
ENDIF
END
Regards,
Ron_2nd
More information about the User
mailing list