Discussion forum about PANORAMIC language
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  
Latest topics
» What happened with the panoramic language ?
by Wed Jan 03, 2024 4:09 pm

» Hello world.
by Wed May 09, 2018 11:53 pm

» Biomorphes de PICKOVER
by Sun Jun 18, 2017 2:33 am

» In less than 10 lines of code
by Fri Jun 16, 2017 5:03 am

» Effect Dopler
by Fri Jun 16, 2017 3:29 am

» SuperEllipse
by Wed Jun 14, 2017 4:01 am

» Plants
by Wed Jun 14, 2017 3:38 am

» Mira's attractor
by Wed Jun 14, 2017 3:30 am

» Triangle of Sierpinski
by Wed Jun 14, 2017 3:22 am

» Esthétique polaire
by Wed Jun 14, 2017 3:16 am

» Butterfly effect : Lorenz equations
by Wed Jun 14, 2017 3:08 am

» Collision detection
by Tue Jun 13, 2017 5:09 am

» The Bees Laline Paull Epub Books
by Mon Oct 10, 2016 8:58 pm

» PANORAMIC for Mac OSX 10 is available
by Tue Aug 09, 2016 6:08 pm

» ide
by Sat Jul 16, 2016 12:27 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 PlaySoundOnce, PlaySoundLooped, StopSound

Go down 
3 posters
AuthorMessage
d.j.peters

d.j.peters


Number of posts : 15
Age : 59
Registration date : 2010-07-31

PlaySoundOnce, PlaySoundLooped, StopSound Empty
PostSubject: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyThu 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
Back to top Go down
http://shiny3d.de
d.j.peters

d.j.peters


Number of posts : 15
Age : 59
Registration date : 2010-07-31

PlaySoundOnce, PlaySoundLooped, StopSound Empty
PostSubject: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyThu 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
Back to top Go down
http://shiny3d.de
Severin




Number of posts : 19
Localisation : Germany/Braunschweig
Registration date : 2010-12-13

PlaySoundOnce, PlaySoundLooped, StopSound Empty
PostSubject: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptySat 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.
********************************************
Back to top Go down
ygeronimi

ygeronimi


Number of posts : 14
Age : 52
Localisation : France
Registration date : 2013-03-13

PlaySoundOnce, PlaySoundLooped, StopSound Empty
PostSubject: re   PlaySoundOnce, PlaySoundLooped, StopSound EmptySat Mar 30, 2013 2:44 pm

You can download Panoramic 0.9.24 here :

Panoramic 0.9.24
Back to top Go down
Sponsored content





PlaySoundOnce, PlaySoundLooped, StopSound Empty
PostSubject: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound Empty

Back to top Go down
 
PlaySoundOnce, PlaySoundLooped, StopSound
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Discussion forum about PANORAMIC language :: Panoramic for Windows :: Source code (snippets)-
Jump to: