Visual Basic - Reproducir sonidos

Life is soft - evento anual de software empresarial
 
Vista:

Reproducir sonidos

Publicado por JuanKa (16 intervenciones) el 17/01/2005 07:59:16
Estoy buscando la forma de reproducir sonidos wav y/o mp3 desde visual basic, incluso me interesa poder relentizar la reproducción.

Muchas gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Reproducir sonidos

Publicado por humanzoo (6 intervenciones) el 17/01/2005 11:01:22
Prueba usando el componente de WIndows media player, aqui hay un tutorial que explica como usarl:. http://www.abcdatos.com/tutoriales/tutorial/l8960.html
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Reproducir sonidos

Publicado por Benjo (679 intervenciones) el 18/01/2005 01:12:32
Dependiendo cuales son los formatos que querés reproducri, te envio un ejemplo de PlaySound sacado de AllAPI.net

Private Const SND_APPLICATION = &H80 ' look for application specific association
Private Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds] entry identifier
Private Const SND_ASYNC = &H1 ' play asynchronously
Private Const SND_FILENAME = &H20000 ' name is a file name
Private Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Private Const SND_MEMORY = &H4 ' lpszSoundName points to a memory file
Private Const SND_NODEFAULT = &H2 ' silence not default, if sound not found
Private Const SND_NOSTOP = &H10 ' don't stop any currently playing sound
Private Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Private Const SND_PURGE = &H40 ' purge non-static events for task
Private Const SND_RESOURCE = &H40004 ' name is a resource name or atom
Private Const SND_SYNC = &H0 ' play synchronously (default)
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Sub Form_Load()
PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_FILENAME Or SND_ASYNC
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar