Play And Record Sound
Anyone know if it's possible to play a wav file and record at the same time? I need to test sound quality from a speaker to a mic.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
I Found Record/Play Sound For Vb
Hi
I found Wave play/Recorder code for Visual Basic
This question is about the
mciSendStringA
it said it was not registered..
i found a piece of code on the net, that , records, plays
sounds, but i need to register it.
i made the interface and added the controls on the form
ran the record, then ran the play and it said the command
i was tring to send when i click the play click on the form
was not registered, is this on my computer that its not registered, i attached a file see if you get the same error message, you dont get a break mode with this error, windows
sends the error, when you click ok it returns to the program.
I just don't understand what do i need to register. Maybe
you need to register to record and play sounds bet me
i am confused with this error.
the project i included
File name of the zip
"recordSound.zip"
Thanks
<P ID="edit"><FONT SIZE=-1><EM>Edited by visualbasic700e on 01/14/01 05:30 AM (server time).</EM></FONT></P>
How Do You Play A Sound?
I am new to VB and wondering how do you play a sound?
The sound I am trying to play is a .wav but I would also like to know how to play .mp3's. Are they the same code? Hope you can help me.
*Timbuk2*
Play Sound
I need to play a sound. I was hoping it could be an mp3 or wmv music file. What's the easiest way to do this?
How Do I Play Sound
Hi everybody, first post here. I've been reading for about two weeks now on this forum and have register the other day.
I have tried many examples on sounds from this site. I do get some to work, yet the one's I don't get is if I was going to compile and burn to disk. I understand about asigning a .dir (path) if I don't burn to disk.
This is what I'd like to do if possible:
I like to compile my project and save it to disk and If possible (unless there's a better way) take the .wav or .mp3 and burn to disk along with the .exe and maybe putting the .wav or .mp3 as a hidden file. Not sure if that's a good ideal.
My main concern is if I put it on disk (cd) is: not everybody drive letter is the same. I've seen some examples but to extract the bits and pieces, is still down the road for me. So with that concern I've tried this below.
I have tried this with error
PlaySound app.path & "" & "Track1.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC Or SND_ASYNC Or SND_LOOP Or SND_PURGE
(Now let's say I have a song and it's is name Track1.wav -does any other part of the above code change?)
What throws me is I look at other sample and it starts: PlaySound app.path & "Track1.wav"
I don't really know where to put it. I've tried Form load, I've tried General Declarations.
I get 'sub or function not defined'
A lot of threads (a lot of good reading) I'm at a stand still.
Thanks
Rick101
ps this is not a half to; it's only I want to.
API To Play A .wav Sound
Hello,
I need help with playing wave files in VB. I've tested OLE-controls, but since my VB version is very old (3.0 in fact), the OLEs don't work too well. I want to try playing .wav files by an API commando. VB helpfile only directs me to the Windows 3.1 API helpfile, which I don't find coz I have XP.
So, where do I find the API help in XP?
Or, if you know how an API command, and declarations, for playing a simple wave sound, please tell me!
Thanks by forehand,
SiMoN
Play Sound
Hi
I am using
PlaySound "C:WINDOWSMEDIATADA.WAV", ByVal 0&, SND_FILENAME Or SND_ASYNC
to play a sound,what should I do if I want to play this sound during 5 seconds?
thanks
Play Sound
Hi,
I need to play a sound clip (.wav ) in a click of a button..without loading a player......is there any API call to do this??
Pl help........
Thanx
How To Play Sound
Can anyone tell me how to play a simple wave file when clicking a button?
one more question, how to execute a vb program in full-screen?
THANKS,
Play Sound
Hello,
I want to play sound when my mouse moves over the label.
Please help me
Farooq
Play A Sound
how do i make my program play a sound when the user clicks a button? i have looked in the properties for the button but it doesn't say sound or anything, the sound is in a wav file on my desktop but i can change it to mp3 or whatever to make it work
Play Sound
Hi. I needed a way to play sounds without depending on a control (Windows Media Player, Multimedia controls). I looked up "play sound" on pscode.com but nothing made much sense. Could somebody help me?
Thanks.
Play A Sound.
hi, how do i play a sound in my app?
i have seen on most examples people use picture boxes to play sound, but how? when i copy their code and try it it doest work? (yes i put in the name of my sound file, not theirs)
what do i do, say if i want a .midi file to play when the form loads.
thanks
Play Sound
With the
sndPlaySound Lib "winmm" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
what is the difference between:
Public Const SND_SYNC = &H0 ' play synchronously (default)
Public Const SND_ASYNC = &H1 ' play asynchronously
ie. what is the difference when you play a sound synchronously vs. asynchronously?
thANKS!
Play Sound...
OK I know that you know that how to play an MP3 or wav file in VB...
But I am now looking for smallest code without any dependencies which can give me a facility of playing, pause-play, stop.
I don't need to know how long is the file and how much time is left and anything like that...
Just 3 functions...
1. PLAY
2. PAUSE-PLAY
3. STOP
Any challangers...
Cheers...
How To Play Sound?
I want to play a wav file from the same folder my program is in once a timer goes off, how do I do this?
Play Sound
How can i make that when a form is loaded or when a button is clicked, a sound is played?
Play Sound
I play a sound on click...however on a button I call a msgbox so I get the sound plus the dumb window sound when the app displays the msg box...Is there a way to kill the window's sound on display of a msgbox?...other than changing the settings of the pc...
How To Play A Sound In VB6
When the splash screen is showing, I want to play a welcome sound (.wav). How to do it? or how to code it?
Thanks in advance
How Can I Get A Sound To Play More Than Once?
I have enabled my program to have the ability to play a wav. file. It will only play once, though. I used Microsoft Multimedia Control 6.0 (MCI32.OCX) and tied it into a Command Button to get it to play. This is what it looks like:
Private Sub Command1_Click()
MMControl1.FileName = "C:mysoundsBoogyman1.wav"
MMControl1.Command = "open"
MMControl1.Command = "Play"
End Sub
Private Sub Form_Load()
MMControl1.PlayEnabled = True
End Sub
I'm pretty much a beginner and feel that I'm missing something obvious. What might the Keyword, Function, Property, etc. be that would allow the MMC to "rewind" itself and allow the Command Button to be used again? Sounds are very important to me and I would appreciate any help I could get. Thanks in advance.
Give me a reason to believe that there is a reason to believe.
How To Play Sound?
Hi,
I want to play a sound file when the main form is loaded.
Plz tell me how to do that. Thanks.
How To Play 2 Sound At The Same Time
Hi everybody,
i'm doing a game and I would like to know where I could find a tutorial on how to play a background music and a sound effect when someone choose something.
Thanks in advance,
Play Wave Sound
I use the attached code to play a wav sound!
I just want to embed the .wav file into my executable.
Which ways I have?
I hears that I may use it in my res file.
Is there any other way?
I don't know how to insert in into my res file and how to read it from res file later.
Thank you.
Simple Way To Play Sound?
Is there a way to play a sound in a way that isn't too involved?
I just need an explosion noise when I click a button, that kinda thing =)
thx!
When Its Time, Play Sound
how would i go around programming this little program.
you enter the time into an inputbox called "current" the program stores "current" and plays a sound 1 minute before the "current" time. as like an allert.
i tryed using the "Now" so the comp could define the current time. but no luck. any ideas?
What Is The Code To Play A Sound?
I'm quite new to vb, and I was wondering how to simply play a sound. I have checked out some sample files with sound in them, but I can't get them to work in my project. What i'm actually trying to do is add in some background music for my 'pong' type game. I wanted it to start when the form loaded, but it didn't work. the following is what I had in my module.
'The following is in the general declarations
Private Declare Function dcPlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
'This next part is when the frame loads. which is pretty self explanitory since it says so.
Private Sub Form_Load()
Dim strSong As String
strSong = "A:PongPong_FilesPongMusic.mp3"
Call dcPlaySound(strSong, 0, SND_USUAL)
End Sub
could someone please help me?
Problem With Play Sound Using API
Hi. This code lets us play at a click of a button. Only problem with this is that it tells "complie error, variable not define."
What's wrong?
And hw can i stop it from playing at a click of the same button again?
Thanks.
-----------------------------------------------------------------------------
Private Declare Function sndPlaySound Lib "WINMM.DLL" _
Alias "sndPlaySoundA" (ByVal hwnd As Long, ByVal uFlags As Long) As Long
Const cSndSYNC = &H0, cSndASYNC = &H1
Const cSndNODEFAULT = &H2
Const cSndLOOP = &H8, cSndNOSTOP = &H10
Private Sub cmdPlaySound_Click()
SoundName$ = "D:Dianawavescript_1.wav"
result = sndPlaySound(SoundName$, cSndASYNC Or cSndNODEFAULT)
End Sub
Play Sound From Resource
I've done some research here on the forum and I came up with an example that doesn't work in my program:
Code:
PlaySound ByVal 101, App.hInstance, SND_RESOURCE Or SND_ASYNC
I have all the things in a module:
Code:
Public Const SND_APPLICATION = &H80 ' look for application specific association
Public Const SND_ALIAS = &H10000 ' name is a WIN.INI [sounds] entry
Public Const SND_ALIAS_ID = &H110000 ' name is a WIN.INI [sounds] entry identifier
Public Const SND_ASYNC = &H1 ' play asynchronously
Public Const SND_FILENAME = &H20000 ' name is a file name
Public Const SND_LOOP = &H8 ' loop the sound until next sndPlaySound
Public Const SND_MEMORY = &H4 ' lpszSoundName points to a memory file
Public Const SND_NODEFAULT = &H2 ' silence not default, if sound not found
Public Const SND_NOSTOP = &H10 ' don't stop any currently playing sound
Public Const SND_NOWAIT = &H2000 ' don't wait if the driver is busy
Public Const SND_PURGE = &H40 ' purge non-static events for task
Public Const SND_RESOURCE = &H40004 ' name is a resource name or atom
Public Const SND_SYNC = &H0 ' play synchronously (default)
Public Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
If I put a filename instead of the resource it works, but with resource it doesn't work... what is the problem?
How To Play A Sound File?
i am creating a gsm program... wherein whenever a message is received, the program will alert user by giving off a sound...
how can i make it work using vb6?
Every 3 Secs Play Sound
Private Sub Form_Load()
Me.Caption = ""
AlertForm.Left = (Form1.ScaleWidth - AlertForm.Frame1.Width) / 2
AlertForm.Top = (Form1.ScaleHeight - AlertForm.Frame1.Height) / 2
Timer1.Interval = 3000 '3 sec
Timer1.Enabled = True
MMControl1.Notify = True
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.Filename = App.Path + "sound.WAV"
' Open the MCI WaveAudio device.
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Private Sub Timer1_Timer()
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Sub
Ok the above code why it is not working ???
Hmmm i wanted every 3 seconds it will play the sound.wav file.
Anyone can help ?? thanks
How To Play Sound Files
whats the code to start a sound file playing, and is there a way to get it to start or stop at a specific length in the song? thanks in advance
Play A Sound In Vbmodal
Hi
I have an alert form that alerts the user that he has a meeting in 5 minutes,when this form appears it must play a sound for 10s while displaying a message to the user.My following code makes that the sound is played and when finished(after 10 s) displays the frmalert with the message("Msg").
VB Code:
Private sub cmdshow_click()frmalert.show 1End sub Private Sub Form_Load()frmalert.txtalert.Text = MsgPlayWavSyncr "C:BookIntel.WAV", 10 'This will play the Wav while time ellapsed < 10 secondsEnd Sub
can anyone help me
thanks
How Do I Get The Time Of Day, And How Do I Play A Sound?
I am trying to make an alarm clock, and I need to know how to get the time of the day/play a sound. I want somthing like this:
VB Code:
Dim UserSetTime as long Private Sub Form_Load()Timer1.Interval=100End Sub Private Sub Timer1_Timer()If UserSetTime = GetSysytemTime Then 'I dont know the correct function PlaySound("Sound1.wav") 'I dont know the correct functionEnd IfEnd Sub
Make A Sound Play
does anyone know how to make sound play on certain stuff? e.g..
If Text1.Text = "hello"
play <sound file here>
End If
anyone know?
Play Sound In Buffer
I'm making a program that when you move mouse on button it will play sound, but if i use PlaySound api it will load a sound everytime mouse hover on button, so it's not good for harddisk health. so I planing to have it play sound on buffer, but how?
Please help.
Thanks.
Play A Sound File (.mp3/.wav/etc...)
I'm making an internet checker (for me and some friends) cause we always get disconnected from the internet while playing offline games (we're downloading stuff)
Anyway, I want them to be able to specify a .WAV or .MP3 file which will be played on a timer. I also want the program to already have a sound file WITHIN it, so that it will play it as a default.
Help?
Get Windows Ver + Play Sound
im back w/ another question set.
i searched the forums and didnt find exactly what i need
i know that i have to use something like Winversion though. but, i dont know what i have 2 do to get a version then play a sound based on the version from the windows sound folder. can any1 help?
Play Selected Sound
Ok well in my program I want to open a sound file and then play it by pressing a command button. So I load a sound file into an array and display the path in Text1.Text. Then I want to press a command button and it will play the sound file that was selected? Well any ideas/help or code is very much appreciated and welcome so thanks for your time and have a good day
How To Play A Midi Sound
How would you play a midi sound, but the midi file is located in the application path of the project.
Play Sound From Buffer
I have loaded a .wav file into a buffer but how would i play it from the buffer using mcisendstring or even playsound?
-Sael
Recommended OCX To Play Sound (Wav/mp3)
hi all, im just looking for an ocx (free) file to play sound (mp3/wav). i been searching in the net but the one that found is too complicated, i just cant understand how to use/code.can anyone help me?
Edited by - AbbydonKrafts on 4/5/2007 4:42:20 PM
|