Loaded Audio Wav Repeats Every 4-5 Sec Not Sure How To Stop?
Apr 24, 2012
Here's the code:
'Determine and Display User-Selected Major Chord
If Me.tvChordExpressions.SelectedNode.Name = "NodeAMajor" Then
'display chords
Me.pbMain.Load("D:Visual Studio 2010ProjectsMusicaMusicaChordsMajorA.jpg")
'play A Major Chord
My.Computer.Audio.Play(Application.StartupPath & "Audio ChordsAMaj+10.wav")
End If
[Code]...
this works great, however the problem is that the audio file (A Major in this example) will repeat playing every 4-5 seconds. Question?...Why and How do I stop this?
View 3 Replies
ADVERTISEMENT
Feb 7, 2011
How do I stop a audio stream once I play it using sapi. Do I have to skip the whole set of sentences ?
View 1 Replies
Apr 18, 2010
I have a start and stop button on a form and would like a pause and restart button aswell.
I can start my audio file (WAV file in the C-Drive) fine with;
My.Computer.Audio.Play("C:Bleep_TestBleep_Test.wav", AudioPlayMode.Background)
Thus allowing other functions to be carried out.I can stop my audio with;
My.Computer.Audio.Stop()
But i would like to be able to pause and restart the audio?There are timers and getkeystates envolved with this form. The timers I can pause and restart, the getkeystates are a function called in conjunction with the timers as a case statement, (all this is working).how to pause and restart the audio, bearing in mind the loaction and the other features of the form? (I only wish i was a clever as you guys/girls out there to return the help rather than leaching your knowledge continously)
View 5 Replies
Jul 13, 2009
I use visual studio 2008. I have a problem I finally got the progress bar to work but I want it to stop when the website I choose to display is fully loaded.
Here is my code below
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
[Code] .....
View 7 Replies
Jan 28, 2010
I'm developing a standslone system for my school project. I'm developing an audio management system which allow user to add audio files itself into database together with the audio information such as artist name and album year. I just started it few days ago and face some problems.. my song in the playlist wont continue to play after 1 finished and i need some idea on how to store the audio files into database ... in blob types may be?
Heres the screenshot and codes
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_add.Click
[CODE]............................
View 2 Replies
Jan 29, 2012
So, after entering the following code into my app (which has WMP embedded for user to listen to the Bible in Audio) I ended up getting an Error/Alert when Running the app and Selecting the Option: "Hide Player and Stop Audio".
View 4 Replies
Mar 13, 2009
I just want to ask or I need some idea on how to convert wav files to mp3 and compressed the file to make the size smaller. I've search on the internet and find vorbis.dll as a reference object and lame.exe for converter. With regards to the audio compression, i downloaded monkey's audio software but doesnt have an idea on how to incorporate it.
View 2 Replies
Jun 11, 2009
Im trying to capture the audio played on my laptop. so i have searched the internet and found a source code for doing exactly that. the problem i have is that my audio device is not listed in the dropdown box (see picture) but it does when its run on windows xp (im running windows 7 x64) the goal of this application would be to capture my friends radio stream and save the individual played mp3's to a loction on my hard drive.(yes i have permission) i have included the source code so perhaps some 1 could have a look at it. (source code)[URL]
View 2 Replies
Feb 26, 2007
make a VU meter for Audio to monitor audio input devices volume level such as microphone and etc?
View 7 Replies
May 20, 2009
I have a database application developed around Access with VBA,I have used the Speech SDK and developed an application that in conjunction with MSCOMM 6.0 library calls into a remote IVR system.It sends in the credentials and queries information in response to that IVR's verbal requests. All seems successfull except for one problem;I'm using a shared SR engine and its using the system microphone as its audio input, this in turn gets the sound from the speakers which are routed to the telephone line through the modem. Of course this has a number of disadvantages - noise added to the sound from the environment and sound quality degredation as well as speaker volume dependency.
I would like the SR engine to take its audio input from the modem in paralell with the sound that goes to the speakers (so we can listen in to the call as well). This means that I must route the system audio output to the SR engine audio input. It seems that I must use an InProc SR instance - however in VBA that type is not recognized - since the shared SR uses the microphone as input by default. there is some statement to the effect that it is difficult in Microsoft's Help file. I'm unable to set the SR audio input to the modem output stream in VBA.As needed I can accomplish the C++ interface using an ActiveX object or a DLL to expose the missing API to VBA?
View 7 Replies
Apr 14, 2011
I'm trying to create and start a thread(s) that execute certain sub continuously.[code]
View 4 Replies
Jul 12, 2011
I'm down to the final coding on one of my projects, when i notice that the backgroundworker behaved strange. For each time i run the backgroundworker, it repeated it self one more time, and the new time, it repeated one more time.
So, if i run the worker a third time, it would repeat it self 3 times.
First run: Runs one time
Second run: runs twice
Third run: run 3 times
And so on.
So, i'll post all the code from that form.
Here goes.
CODE:
View 2 Replies
Feb 2, 2010
I dont have anything to handle it when its full but it never gets there. I need it to pick a random number from 1 to 60 that doesn't repeat but i keep getting a system.stackoverflowexception and it will repeat numbers.
num = RandomNumber.Next(usedcountries.Length - 1)
'TextBox1.Text = num
If first = True Then
usedcountries(y) = num[code]..............
View 2 Replies
Jan 7, 2012
I am a complete newbie at vb trying to design a quiz where the user will be presented randomised images to grade. I am at the stage of writing code to randomise image without repeating. Images are stored in imagelist (not sure if this is the best way to 100 images - I've read a few posts about limitations of imagelist) and are being randomly presented in picturebox. At the moment my code loops around continuously with repeats. However I would like it to present images randomly without repeating. Here's the randomise snippet of my code. Hellllppp! it loops round and I'm not sure about to remove images.
[Code]...
View 14 Replies
May 23, 2012
I've seen a few other people ask this question and have tried the responses that they have had with no luck.
I am trying to use the randomize command to generate a truly random number. What I am doing is reading an access table to get the number of records, then seed the randomize statement with that number of records with the top range for a random number. I then use the number to select the record I want from that table via it's ID number. My code for doing that is working great.... except that it is always calling on the same record each time through the loop. Here is the code.
[Code]...
View 6 Replies
Sep 23, 2009
how can i play the audio after the previous audio play is finish by using directx.
assume i have audio1.wav and audio2.wav.
i play audio1.wav by this code.
audio1 = audio.fromfile("D:audio1.wav", false)
how can i play audio2.wav after audio1.wav is finish? without use any button or signal. just depends on when the audio1.wav is finish, then audio2.wav will play automatically.
View 4 Replies
Jan 6, 2012
I am trying to design a quiz where the user will be presented randomised images to grade. I am at the stage of writing code to randomise image without repeating.
Images are stored in imagelist (not sure if this is the best way to 100 images) and are being randomly presented in picturebox. At the moment my code loops around
continuously with repeats. However I would like it to present images
randomly without repeating. Here's the randomise snippet of my code.[code...]
View 13 Replies
Aug 7, 2009
I'm trying to shuffle a Euchre Deck and it works but I feel like I'm cheating. Is there a more concise way to randomize a list of numbers 1 - 24 and have no repeats? ex. 14, 3, 18, 23...
Dim Deck() As String = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
Dim A As New Random
Dim B As Integer = A.Next(0, 24)
Deck(B) = "9 of Clubs"
[code]....
View 7 Replies
Feb 3, 2010
I am trying to write a program that gives a random number with out repeats the limit is 60 right now. I get a System.StackOverflowException error randomly sometimes it could be 5 numbers in it could be 50. also it will repeat some numbers. Ive been looking over it and it looks like it should work to me idk why its not.
BTNgen calls this sub.
Private Sub gen()
If y = usedcountries.Length - 1 Then
BTNgen.Enabled = False
[Code]....
View 6 Replies
Dec 14, 2011
I have two rich text boxes, and two buttons on my screen. The first button grabs HTML from a URL and then converts the HTML to XML which resides in rich text box 1.
The second button is to grab the XML from the rich text box1 and then parse it to grab all the input elements by their ID.
My issue is that my parser isn't doing anything. My guess is that I'm not quite getting the XML from the first rich text box.
What would be the best way to grab the XML from a rich text box load it into memory and then parse the XML to grab all the ID tags?
Here is my code --
Imports mshtml
Imports System.Text
Imports System.Net
[Code].....
View 1 Replies
Dec 15, 2011
I have two rich text boxes, and two buttons on my screen. The first button grabs HTML from a URL and then converts the HTML to XML which resides in rich text box 1. The second button is to grab the XML from the rich text box1 and then parse it to grab all the input elements by their ID.
My issue is that my parser isn't doing anything. My guess is that I'm not quite getting the XML from the first rich text box.What would be the best way to grab the XML from a rich text box load it into memory and then parse the XML to grab all the ID tags?
[Code]...
View 1 Replies
Dec 12, 2009
I'm trying to make a Bulls and Cows type game, I was able to do it fairly easily with javaScript, but VB is killing me. I can get the array 5 slots long with random numbers, unfortunately they're all repeats. when I try getting no repeats I run into infinite loops, exponentially increasing array lengths, and just plain old arrays with 5 numbers randomly generated, but with repeats.
I'm trying to do this with loops, in JS I did it using regular expressions
Here's an example of my code.
Public Class Form1
Dim intRand(0) As Integer
Dim RandomClass As New Random
[Code]....
View 19 Replies
Sep 4, 2009
I'm wondering if anyone else has encountered this in visual studio 2008. I'm writing an asp.net app and when I run through debug it's jumping all over the place. It skips certain lines, at least it appears to, then it jumps to the bottom of the page and repeats the same line a few times then jumps to a separate sub I have in there. The weird thing, besides its behavior, is that it's not grabbing a piece of information that exists in one column but is grabbing another one. So anyone else encountered this? What's the fix.
To give a more detailed example it did this on the last debug. I started the breakpoint at line 40. It went to 43 with no problem then jumps to line 66, an end sub line, it then proceeds to go on to the private sub directly below it. That includes it going over the blank lines that would normally be skipped. It goes through the entire private sub line by line including a catch ex line but it displays no error. After hitting that line it immediately returns to line 46 of the sub that it already passed by the end sub line. It then goes down 2 more lines jumps back to the private sub it just left and repeats the end sub line 3 times, only the b at the end is highlighted when doing this not the whole line.
View 3 Replies
Mar 25, 2012
Beginning VB 2010, had a project that requires us to create a list box of 25 randomly generated 0s or 1s. Problem is when I put the loop in, it only repeats the same random number, not different one each loop. What am I doing wrong?This is the code I have so far...Code in Question:
'Declare new random object
Dim RandomGenerator As New Random
intRandomNumber = RandomGenerator.Next(0, 2)[code]......
View 4 Replies
Feb 26, 2009
Alright, so I'm still working on the slot machine. I have three timers all independently going for my three "wheels" of the slot machine.
My issue, is that I'm trying to make a Stop button to stop each timer one at a time, and I'm not understanding why this code isn't working. The logic completely makes sense, and the first "wheel" stops when I click the button, however, it doesnt appear to stop the other two timers.
CODE:
View 2 Replies
Dec 24, 2009
I have a simple application that use thread pool to read a file and input the data into a listbox. I want to be able to stop threadpool from running after clicking a stop button. How do I stop threadpool? Here is the code for my application below:
Imports System.Threading
Public Class Form1
Private Delegate Sub StringDelegate(ByVal text As String)
[Code]....
View 6 Replies
Dec 7, 2009
I created a form and have the variable inputs for 4 motor run statements. Then with a start button the script starts and it is surrounded by a for next statement to loop 10 times. It works fine but if i need to stop the execution of the script with a stop button. I put the stop in a new section but of course does not work to do a motor stop. It just causes the exe to not respond till the loop is complete. Just need to be able to stop the Run1_Click button section.
Edit:I do not mind if it finishes the 4 motor run commands and then stops execution of the loop. So need to figure out a way to trigger a stop from a button on the form to stop the cycle. For the future the loop will be a variable integer input so 10 will not be the standard.
Edit::Does a ' Do ' statement sound like the thing to use? If so how and where would I place that? Have a Stop button on the form and it would stop after the 4th motor run command.
#End Region
Declare Function InitStp Lib "stp.dll" () As Integer
Declare Function RunMotor1 Lib "stp.dll" (ByVal steps As Integer, ByVal interval As Integer, ByVal direction As Integer, ByVal outputs As Integer) As Boolean
[code]....
View 2 Replies
Mar 28, 2011
a datacontext defined in a module(domain services ado.net ria)a page having add/delete methods whenever any method is executed, it is found that all the previous actions (NEW RECORD ADDITION and DELETION OF RECORDS) are carried out before the new action is carried out normally
this behaviour is not prominent but "when using break points and inspecting the values of the variables and table object to be added to context, it is clear that all the previous actions take place again. even when the datacotext. savechanges is called, even after that still all actions carried out on the datacontext repeat themseleves, when any new action is to be carried out
View 1 Replies
Sep 5, 2010
I have a report that i'd like to display an Image for each record. But not all records have an image. The problem I have is that the last image is then repeated in the next record.
I would like to know how to have any empty field display a default image.
Code I have in report
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image21.Properties("Picture") = Me.PhotoLink
End Sub
Photolink is a textfield and Image21 is an Image.
View 1 Replies
Mar 1, 2011
I have a START and STOP button and when the user clicks "start" the program does a whole bunch of calculations and all. However, I noticed that when I was testing the program I clicked STOP the program continues to execute stuff.
My START code is basically a while loop that iteratively does some calculations.
So I just put a boolean variable as the while condition and when user clicks stop its set to false and when user clicks start its set to true. However, when I click stop, the condition is set to false yes but it still executes all the code until the condition is re-evaluated right...so my question is how can I get out of the while loop when user instantly clicks "stop"?
View 5 Replies