d.j.peters
Number of posts : 15 Age : 59 Registration date : 2010-07-31
| Subject: PlaySoundOnce, PlaySoundLooped, StopSound Thu Aug 05, 2010 7:04 am | |
| i get no sound in Release 0.9.19 dated June 17, 2010 but here are an simple work around. DJ - Code:
-
' step1: set filename ' e.g. SoundFile$ = "mywave.wav" ' step2: get pointer of the filename ' e.g. gosub GetpChar ' step3: play it once or looped ' e.g. gosub PlaySoundOnce ' or gosub PlaySoundLooped ' repeat step3 or for an other sound start with step1 ' ' NOTE: ' you can stop a playing sound with: gosub SoundStop
label GetpChar,PlaySoundOnce,PlaySoundLooped,StopSound
dim ret%,pChar%,flags% dim SoundFile$
' step1 SoundFile$="Loop01.wav" ' step2 gosub GetpChar ' step3 gosub PlaySoundLooped ' or PlaySoundOnce
end
GetpChar: if file_exists(SoundFile$)=0 then return dll_on "kernel32.dll" pChar% = adr(SoundFile$) ret%=DLL_CALL3("RtlMoveMemory",adr(pChar%),pChar%,4) dll_off: return
PlaySoundOnce: if pChar%=0 then return dll_on "winmm.dll": flags%=131072 + 16 + 1 ret%=DLL_CALL2("sndPlaySoundA",pChar%,flags%):return
PlaySoundLooped: if pChar%=0 then return dll_on "winmm.dll": flags%=131072 + 16 + 8 + 1 ret%=DLL_CALL2("sndPlaySoundA",pChar%,flags%):return
StopSound: dll_on "winmm.dll": flags%=0 ret%=DLL_CALL2("sndPlaySoundA",flags%,flags%):return
Last edited by d.j.peters on Tue Dec 05, 2023 1:40 pm; edited 1 time in total | |
|
d.j.peters
Number of posts : 15 Age : 59 Registration date : 2010-07-31
| Subject: Re: PlaySoundOnce, PlaySoundLooped, StopSound Thu Aug 05, 2010 1:21 pm | |
| looks like the bug is gone in version 0.9.20i2 i get sound with the PLAY N command.
DJ | |
|
Severin
Number of posts : 19 Localisation : Germany/Braunschweig Registration date : 2010-12-13
| Subject: Re: PlaySoundOnce, PlaySoundLooped, StopSound Sat Mar 30, 2013 8:02 am | |
| **************************************** PANORAMIC V 0.9.24 ist verfügbar PANORAMIC V 0.9.24 is available PANORAMIC V 0.9.24 est disponible PANORAMIC V 0.9.24 es disponible
Das Forum Panoramic ist wieder aktiv. Bitte besucht uns.
The forum Panoramic is active again.
Please, visits us.
Le forum Panoramic est actif de nouveau.
S'il vous plaît, nous visite.
El foro Panoramic es de nuevo activo.
Por favor, nos visita. ******************************************** | |
|
ygeronimi
Number of posts : 14 Age : 52 Localisation : France Registration date : 2013-03-13
| Subject: re Sat Mar 30, 2013 2:44 pm | |
| You can download Panoramic 0.9.24 here :
Panoramic 0.9.24 | |
|
Sponsored content
| Subject: Re: PlaySoundOnce, PlaySoundLooped, StopSound | |
| |
|