maudruidas Posted September 24, 2014 Report Share Posted September 24, 2014 Boa tarde. Pessoal como faço para emitir um sinal sonoro a partir de um arquivo. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 24, 2014 Report Share Posted September 24, 2014 Veja: SNDPLAYSOUND() Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 24, 2014 Report Share Posted September 24, 2014 http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=15434 http://www.pctoledo.com.br/forum/viewtopic.php?f=2&t=15441 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted September 24, 2014 Report Share Posted September 24, 2014 Syntax: SndPlaySound( <cSndName>, <nMode> ) --> <lSuccess> Parameters: <cSndName> Specifies the name of the sound to play. The function searches the [sounds] section of WIN.INI for an entry with this name and plays the associated waveform file. If no entry by this name exists, then it assumes the name is the name of a waveform file. If this parameter is 0, any currently playing sound is stopped. <nMode> Specifies options for playing the sound using one or more of the following flags: SND_SYNC The sound is played synchronously and the function does not return until the sound ends. SND_ASYNC The sound is played asynchronously and the function returns immediately after beginning the sound. To terminate an asynchronously-played sound, call sndPlaySound with cSndName set to 0. SND_NODEFAULT If the sound can't be found, the function returns silently without playing the default sound. SND_MEMORY The parameter specified by cSndName to an in-memory image of a waveform sound. SND_LOOP The sound will continue to play repeatedly until sndPlaySound is called again with the cSndName parameter set to 0. You must also specify the SND_ASYNC flag to loop sounds. SND_NOSTOP If a sound is currently playing, the function will immediately return FALSE without playing the requested sound. Quote Link to comment Share on other sites More sharing options...
sambomb Posted September 25, 2014 Report Share Posted September 25, 2014 tone(880,0.1) tone(1880,0.1) Quote Link to comment Share on other sites More sharing options...
SAOliveira Posted September 25, 2014 Report Share Posted September 25, 2014 Apesar de já ter sido citado, apenas um detalhe a mais. Para quem usa SQL. Uma tabela com campo blob que armazena diversos sons para usar. cSom:=SQLArray("SELECT som FROM _som WHERE registro='1'",,xBanco)MemoWrit("d:\snd.wav",cSom[1,1])SndPlaySound("d:\snd.wav",0)FErase("d:\snd.wav") Quote Link to comment Share on other sites More sharing options...
maudruidas Posted September 25, 2014 Author Report Share Posted September 25, 2014 Valeu pessoal, deu certo com a SNDPLAYSOUND(). Muito obrigado. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.