FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Gestion d'un système client-serveur.
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar Klaus Ven 17 Mai 2024 - 14:02

» item_index(résolu)
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Mar 14 Mai 2024 - 19:38

» Bataille terrestre
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Lun 13 Mai 2024 - 15:01

» SineCube
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar Marc Sam 11 Mai 2024 - 12:38

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar Marc Sam 11 Mai 2024 - 12:22

» Philharmusique
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Ven 10 Mai 2024 - 13:58

» PANORAMIC V 1
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar papydall Jeu 9 Mai 2024 - 3:22

» select intégrés [résolu]
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Mer 8 Mai 2024 - 17:00

» number_mouse_up
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Mer 8 Mai 2024 - 11:59

» Aide de PANORAMIC
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar jjn4 Mer 8 Mai 2024 - 11:16

» trop de fichiers en cours
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar lepetitmarocain Mer 8 Mai 2024 - 10:43

» Je teste PANORAMIC V 1 beta 1
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar papydall Mer 8 Mai 2024 - 4:17

» bouton dans autre form que 0(résolu)
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar leclode Lun 6 Mai 2024 - 13:59

» KGF_dll - nouvelles versions
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar Klaus Lun 6 Mai 2024 - 11:41

» @Jack
PlaySoundOnce, PlaySoundLooped, StopSound Emptypar Jack Mar 30 Avr 2024 - 20:40

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Mai 2024
LunMarMerJeuVenSamDim
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendrierCalendrier
Le Deal du moment :
Bon plan achat en duo : 2ème robot cuiseur ...
Voir le deal
600 €

 

 PlaySoundOnce, PlaySoundLooped, StopSound

Aller en bas 
2 participants
AuteurMessage
d.j.peters

d.j.peters


Nombre de messages : 77
Age : 59
Localisation : Germany
Date d'inscription : 31/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 5:58

Sorry english Embarassed

i get no sound in Release 0.9.19 dated June 17, 2010

but here are an simple work around.

DJ

Download: PlayWave.zip
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

Revenir en haut Aller en bas
http://shiny3d.de
Nardo26

Nardo26


Nombre de messages : 2294
Age : 55
Localisation : Valence
Date d'inscription : 02/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 10:26

You can try this :

Code:

sound 1
file_load 1,"PlayWave\Loop01.wav"
play 1

Wink

But you can't play it twice... why ? I don't know....
Revenir en haut Aller en bas
http://nardo26.lescigales.org
d.j.peters

d.j.peters


Nombre de messages : 77
Age : 59
Localisation : Germany
Date d'inscription : 31/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 11:38

Hello Nardo,
my version of Panoramic (Release 0.9.19 dated June 17, 2010)
has a bug and can't play movies or sounds.

What is your version of Panoramic ?

DJ

here are the error message:
PlaySoundOnce, PlaySoundLooped, StopSound Playwave

Revenir en haut Aller en bas
http://shiny3d.de
Nardo26

Nardo26


Nombre de messages : 2294
Age : 55
Localisation : Valence
Date d'inscription : 02/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 11:47

Revenir en haut Aller en bas
http://nardo26.lescigales.org
d.j.peters

d.j.peters


Nombre de messages : 77
Age : 59
Localisation : Germany
Date d'inscription : 31/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 12:19

Thank you Norda
with version V0.9.202i i get sound with play PLAY N command.

DJ
Revenir en haut Aller en bas
http://shiny3d.de
Nardo26

Nardo26


Nombre de messages : 2294
Age : 55
Localisation : Valence
Date d'inscription : 02/07/2010

PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound EmptyJeu 5 Aoû 2010 - 12:28

I don't know why but

sound 1
file_load 1,"PlayWave\Loop01.wav"
play 1
wait 2000
play 1

the file wav is played one time....
Revenir en haut Aller en bas
http://nardo26.lescigales.org
Contenu sponsorisé





PlaySoundOnce, PlaySoundLooped, StopSound Empty
MessageSujet: Re: PlaySoundOnce, PlaySoundLooped, StopSound   PlaySoundOnce, PlaySoundLooped, StopSound Empty

Revenir en haut Aller en bas
 
PlaySoundOnce, PlaySoundLooped, StopSound
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos sources, vos utilitaires à partager-
Sauter vers: