Build A Small Program Which Will Allow Some One To Click On The Exit Button And The Sound Will Play And At The End Of The Sound The Program Will Then Close?
Apr 17, 2009
I am trying to build a small program which will allow some one to click on the exit button and the sound will play and at the end of the sound the program will then close. The sound clip is about 3 seconds long Here is what I have:
Imports Microsoft.DirectX
Imports Microsoft.DirectX.DirectSound
Public Class Form1
Private Dsound As CSoundDevice
I have background sound loop with the My.Computer.Audio and it works fine. I want to play another sound (like a beep) when desired without stopping the background sound. Several examples I have found don't seem to work. I am in VB.NET 2008 Professional.
I wonder how to put a sound clip in my vb.net form.I am using vb 2008.When a user starts my program, I want the sound to be played automatically and with a mute button.
I found this online and I am getting an error[code]...
A call to PInvoke function 'WindowsApplication3!WindowsApplication3.Module1::apisndPlaySound' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
I want to include a functionality in my application such that when the user clicks on a button, the user should be able to record the voice, and when stopped, the sound should be saved. Here's what I wrote for the Start and Stop button.
I am trying to make my form when user clicks on the exit button it will go to the tasktray bar. But when right clicked it will exit the application. How would I do this? I have a ToolWindow
I was wondering if it would be possible to monitor a programs audio output and identify when its on / off? I'm coding a carpc frontend and would like to mute the audio when the navigation program speaks directions.
I wrote a program to have countdown and at 00 to have sound horn. I got the clock running but the horn sound is delayed. I need the time at 00 to sound the horn. I use this in a game of basketball. How can I make the playsound at 00 seconds and not -01 second.
I'm getting data from an external source, storing it in a single array, and I want to turn it into sound, even though it isn't really sound to start with. I don't know how to build sound from data arrays, but I think it shouldn't be that hard. I am hoping someone can show me the secret.
The data get's read from a 12-bit data acquisition card at fifty mega-samples per second, and it normally contains ten distinct frequencies from about one megahertz to about five megahertz with some overtones. So it's very high-frequency stuff to start with, but it should be possible to to scale it down by, say a factor of a thousand (where humans can hear) then put it through a sound generator through VB, so I can hear it. Also, I don't want to export it as a .wav file first. I just want to format it and package it for the sound player, so I can listen to it live, as I play with the external stuff that affects the sampled waveform going into the card.
So, maybe I'd take a sample of a fraction of a millisecond, scale to a sound format, then output it to my speakers. A frame of 32,000 samples, for example is about 0.64 milliseconds of real time, but I could scale that out into quite a long sound. Ya think?
How can I make a program to record sound from the microphone? I've tried lots of thing but they don't work. Can someone show me how to do ths using winmm.dll or DIrectx?
I'm using OpenTK to get OpenAL lib.I'm using OpenAL to play multiple wav files at a time(or so i want).Do you know any tutorial/source code in .Net (VB/C# doesn't matter) that could help me use OpenAL to play multiple files?
i have designed my owm mp3 player . and now i want to add a sound visuvalizer in my program . but i dont now how can i do this? how can i find sound Frequence?
I want to play a sound on start. I imported my sound.vb, added m.wav as a resource. changed m.wav to embedded resource. but it wont work??? Just to check my code i made a new project, used the same code, and it worked fine.
I'm trying to play audio files (.mp3, .wav whatever it is) with mciSendString function but it's not working. Here's my codes
//// here is the api Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
How can I play more than one sound at a time? I have a song that I want to play and a sound effect, but when I play one it stops the other. They are both dimmed as two seperate media.soundplayer and they are both pulled from the same reference folder and they are two seperate files. How could I do this?
I have a question about of capture sound function, someone have a code example for visual basic 2010 in windows 7?, I tried using mcisendstring function but the sound quality, is poor.
Is there a way that I can record sound, and save it in the program so that it can be replayed?I'm making an alarm clock program, and I thought it would be cool if the user could record his/her own audio, and have it play back for him/her.