Replay A VB Audio File Or Stream?

Sep 21, 2010

I am trying to write a little synthesizer program, and as a first step I am creating .wav files opened for reading and writing using the code below called from a button click event handler. The audo plays but once, no matter how many instances of the Audio.Play method are called. I also tried closing the file and then calling the Audio.Play method on the full path name. In each case, the audio plays but once. If I click the button again, the file will be played once more. The duration for the audio is one second, so I am sure that it is only being played once every time. I do not want to loop the data. The idea is that when the user plays a new note, I update the file and replay it with the new data. Since the file is recreated every time I click the button, I guess what I *need* is working, but I am still curious why I cannot replay the content of the file.

' Create a file stream object for reading and writing.
Dim FS As New IO.FileStream(fileNamePath, _
IO.FileMode.Create, _

[Code]....

View 9 Replies


ADVERTISEMENT

Audio Stream Capture From Web

Nov 18, 2009

I have link: [URL]

I want capture the audio stream on my computer in mp3/wav.

I have no idea from what i should start. What should i use for start developing? I'm working in VS2008 on VB. Can i do it in VB? What additional software i need?

View 2 Replies

.net Capture System Audio To Stream?

Jun 21, 2011

Is it possible to capture all/any audio played by a PC into a system.io.stream, so that it can then be run through speech recognition (System.Speech.Recognition.SpeechRecognitionEngine)?Essentially I'm looking to pefrom speech recognition on any audio on the client PC, google seems to suggest that capturing a stream like this can be done using Microsoft.DirectX.DirectSound, however I cannot honestly determine how.

View 1 Replies

Convet My.resources Audio To Stream?

Jan 4, 2011

I'm using vb.net and "my.resources" to store wav audio files.I know I can play such files using:

My.Computer.Audio.Play(MyProjectName.My.Resources.Resources.resourcename, AudioPlayMode.BackgroundLoop)

However I want to use bass.net to play the file and it requires either the the file name on the file system or a stream. how do you get the data inside an audio resource into a stream?This is what I have so far:

Dim imgByteArray() As Byte
imgByteArray = CType(MyProjectName.My.Resources.ResourceManager.GetObject("resourcename"), Byte())
stream = New System.IO.MemoryStream(imgByteArray)

[code]....

I get this error on the bold line above:

Unable to cast object of type 'System.IO.UnmanagedMemoryStreamWrapper' to type 'System.Byte[]'.

1. Is there a way to cast from System.IO.UnmanagedMemoryStreamWrapper to type System.Byte?

2. What would be the best method to get the audio resource into a stream format?

View 5 Replies

Detect Silence Of Audio In Buffer Of WMA Stream?

Aug 24, 2010

I have a standard WMA stream, streaming in constantly via the internet. I need to write an application to stream this audio, and looks for any periods of 'silence'. When it detects silence, it runs an event.

For the purposes of this, silence is defined as three seconds of zero-level audio. The stream keeps going in a technical sense, but there is no audible noise coming through it.

However, I want the program to detect the silence while it is still in the 'buffer'. That is, the user won't hear this silence before the program detects it is there.

The audio shouldn't stop as it is analysing this silence - it needs to keep playing the audio constantly to the user.

I'm open to using whatever suitable API is out there - such as BASS, or the Windows Media extensions built into the dot net platform.

View 2 Replies

Microphone Audio Stream DIRECTLY To Speaker In VB?

May 6, 2011

It SOUNDS simple. In aVusual Basic application, how do I made an open (or controlled thread) connection to continuausly stream the microphone to the speakers?

View 1 Replies

Redirect Audio Stream To/from The Serial Port?

Jan 19, 2011

I'm writing a program that will allow me to send SMS and call using a GSM modem.

I'm communicate with the modem using AT commands.

I have a problem with "connect" sound from the modem to the speakers.

After installing the modem is visible in the system as two ports.

On one of them sends and receives commands.

The second is just for voice communication.

I can't redirect PC audio input/output to the modem serial port. (So I can't hear callers and vice versa)

From what I've managed to find I have to use SAPI. (ISpVoice::SetOutput)

View 10 Replies

Stream Audio And Video In The Local Area Network?

Oct 26, 2009

I am developing an application where in I need to stream audio and video in the local area network. There is calling option from my application where users can call each other(audio call or video call) in the LAN.

View 3 Replies

Audio Management System - Allow User To Add Audio Files Itself Into Database Together With Audio Information

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

Replay Button For Timer?

Jul 26, 2009

I trying to create a replay button for my timers. So that i can just click the replay button and replay the moving action.

[code]...

View 1 Replies

.net - Record And Replay Raised Events?

Mar 13, 2012

I implemented the communication between two classes by using events in VB.Net.Now I want to store (record) all events that occure and to re-raise (replay) them again later.

Here is what I have already:

Class1:
Public Event Button1Pressed(ByVal sender As Object)
Private Sub btnButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnButton.Click
RaiseEvent Button1Pressed(Me)
End Sub

[Code]...

I could add another handler to the event I want to record, but then in the handler I only get the parameters that are passed to the event and not the event itself.Another thing I don't know how to solve is, that I can't raise an event from an extern class.

View 1 Replies

VB 2010 Replay, Log And Adding Sound?

Nov 4, 2011

VB 2010 Replay, Log and Adding Sound

View 1 Replies

Create A Replay Button For Moving Pictures?

Jul 23, 2009

I now trying to create a replay button for my moving pictures. So that i can just click the replay button and replay the moving action instead of choosing which picture to move and click play.

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If ComboBox6.Text = "Host 1" And ComboBox5.Text = "Host 2" Then

[Code].....

View 2 Replies

Audio Converter And Compressor - Audio & Video - Dream.In.Code

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

VS 2008 Recording Audio - Capture The Audio Played On My Laptop

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

Make A VU Meter For Audio To Monitor Audio Input?

Feb 26, 2007

make a VU meter for Audio to monitor audio input devices volume level such as microphone and etc?

View 7 Replies

Routing Modem Audio Out To SR Engine Audio Input Under VB / VBA?

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

Stream Read Return Length 0 While Stream Is Open And Has Valid Data In It?

May 25, 2012

in an winForm app in VS2010 win 7 compiling to x86, I try to do what Alvas.Audio seems to work. See (c# ex: [URL] for reference.

Dim data() As Byte = wr.ReadData(second * i, second)

The result give me data.length()=0. I do not have any exception, I can read format from it and whatever reader I use I got this problem.EDIT : After some tests, it seems like the uncompressed file I create in the first step (in PCM format, with .wav extension) can not be recognized by the Alvas.audio library for the second step. I must miss something around Audio file markups or something alike.

Here is the code that might be the source (basically this is step 1):

Dim functOut As String = String.Empty
Dim wr As Alvas.Audio.IAudioReader = Nothing
Dim fs As IO.FileStream = Nothing

[code]....

How can I write the resulted stream to be sure I can read it again later?

View 1 Replies

Loading A File Into Memory Stream Buffer And Creating New File With Same Content And With Different Filename?

May 31, 2011

I don't know whether it is simple or not because i am new to programming. my requirement is : In my vb.net winform application, the filenames of the files present in "D:Project" willbe displayed in DataGridView1 control. Now I want to load these files one after another into memory stream buffer and add the headers("ID","Name","Class") to the content in the file. Then I want to save these files in "C:" with "_de" as suufix to the filename i.e.,sample_de.csv.

View 1 Replies

File I/O And Registry :: File Stream - Backup Program That Zips Files ?

Feb 9, 2009

I am writing a backup program that zips files. Using some sample code I have the following that creates a zip file. Problem is it does not get any subdirectories or files. Where am i going wrong?

Dim azFileNames() As String = Directory.GetFiles(SourceFolder)
Dim objCrc32 As New Crc32()
Dim zipStream As ZipOutputStream

[CODE]...

Alternativley, there is another component to the zipping dll that I could probably bypass the above altogether. It is: FZ.CreateZip(DestFile, SourceFolder, True, "", "") Where DestFile is (Output stream as system.io.stream). I'm trying to read all the files, directories, sub dir and files, etc from a specific location, let's say 'My Documents' into Destfile in which the FZ.CreateZip zips the file. FZ is FastZip which is from icsharpcode.net. They have c# examples, but that's greek to me. I'm trying to just learn VB!

View 6 Replies

Modify Few Byte In A File Via A Stream Does That Means That Full File Is Rewritten?

Jun 9, 2010

If i use a stream to modify few bytes in a file without changing the total number of bytes

does the stream rewrite all the file even if just few bytes have been replaced?

View 1 Replies

Seeing If File Is Audio?

Dec 9, 2011

I just wanted to be able to detirmine if the file that the user selected out of an OpenFileDialog is an audio file (mp3, mp4, wav, etc.)

I know that I can just use the filter property with the OpenFileDialog box, but I'm sure that there must be an easier way to validate the file the user chose and see if it's an audio file.

View 6 Replies

Take A Static Stream Reader And Switch It To Another Text File Based On The User Changing The File?

Mar 10, 2010

Is there anyway to take a static stream reader, and switch it to another text file based on the user changing the file?

View 1 Replies

Anyway To Read Text File With UTF-8 Encoding Using Streamreader Or File Stream

Jun 21, 2010

i would like to ask is there anyway to read a txt file with UTF-8 encoding using streamreader or filestream. the txt file is contain some extended ASCII that makes me cannot read the characters properly. I hav tried Encoding.ASCII.GetString(Encoding.UTF8.GetBytes()) but still it return wrong character when it's reading extended ASCII code.

View 2 Replies

VS 2010 Make Shoutcast Stream Info Like The Stream Name

May 5, 2011

Im making a desktop player for a online web radio, and for the program I wanna make it show all the stream info. Like the stream name, and such. However I dont know how to do this? I looked everywhere

The server url is setup like this "[URL]" And it has all the stream info and that there. So is there a way I can get the info from there onto like say a label? Live updates btw.

View 1 Replies

Audio File Attributes?

Jun 1, 2010

i'm trying to read the details information from various audio formatted files, most of which are mp3s. specifically i'd like to be able to read the title, artist, and # for a few hundred files that need renaming and resorting, so i'm trying to start with a single file.basically, if you view the properties of any mp3, and go to the details tab, all of this information is listed. i need to grab it programatically using visual studio 2010

View 3 Replies

Duration Of DSS Audio File?

Jun 21, 2010

according to the formula given by DdoubleD i resolve DSS audio file duration problem, but this time some dss file is more compressed and duration of these file different according to size of file. IS there is any technique in .net 2005 so that i can include any third party's player and find duration and other thing I tried to include DLL of these player but not compatible with .net..DSS file is basically dictation by doctor(olympus recorder is use to record dictation and it save these file in .dss format) I already included WMP.dll for MP3. But .dss is creating problem.

View 1 Replies

Edit An Audio File In VB?

Oct 21, 2011

I have been looking for a while now but I can't seem to find ANYTHING on editing audio files with vb. All I want to be able to do is to input an audio file and have the program change around the "peaks" of the samples and output a very different sound to be exported. I don't even know where to start.

View 3 Replies

Way To Handle An Audio File?

Mar 11, 2010

I have been working on this for a long while now, I have added a Windows media player that I hide in the Background of my application window(form) . and lets say its named "Player"Player. "WHAT" = gets me the Original length of the Audio file being played ?I tried something .something. duration ... but that gets where the player is actually is . that's for the first request.

View 3 Replies

Making A Game In Which The File Stream Gets A Certain File(lets Say A.txt)?

May 29, 2011

i am making a game in which the file stream gets a certain file(lets say a.txt) and it reads it, if it has certain values stored in the file it returns boolean(this is a function), then a sub procedure writes to the file using a streamwriter and a filestream using the same file. I am having problems, sometimes visual basic says that another process is using the file, this is before i closed the filestreams and the streamwriter or streamreader, then it gives me errors when i close the files, it tells me that it can't access a file that is already closed, i thought the filestream gets the file and lets the streamreader or streamwriter read or write to the filefound out the problem?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved