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
ADVERTISEMENT
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
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
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
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
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
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
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
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
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
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
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
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
Feb 28, 2009
i'm unable to debug my project that i made. i save it and everything, but it just won't playit says Warning 1 Could not find type 'WindowsApplication1.My.Resources.Resources, Time table'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. C:SchoolIPTTime table, using 2 loopsTime table, using 2 loopsForm1.Designer.vb 123 0 now when i open it up and try to debug it , it comes up with an error, i even try referencing it but it does nothing ,
View 2 Replies
Nov 22, 2011
I have a problem with the cryptostream, if i write the stream to a memorystream the memory that the stream used is still alocated and i have no way of unalocating it.what am i missingdoing wrong? im using-using on the streams,readers and crypto stuffs so the framework should shut them all down right? i tryed calling .close and .dispose but nothing ,in fact i moved it all over I have provided the sub that im using for the encrytion im in .net 4.5 so there is a lil async stuff but i know thats not the problem coz i moved this code out of my main app(.net 4) for testing to see if i could fix the problem.[code...]
View 12 Replies
Jun 22, 2010
error: the item "objdebugassociateassist.frmdbsetup.resources" was specified more than once in the "resourceS" parameter. duplicate items are not support by the "resources" parameter.
View 1 Replies
Sep 24, 2009
I don't understand. Till now this little app was working ok. Error1 The item "objReleaseRadni_nalozi.GlavnaForm.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.Radni nalozi What gives?
View 4 Replies
Jan 23, 2012
I have all 66 books of the Bible in audio format. MP3 I believe. I want the users to have a choice of either reading the book of Romans or listening to it.
View 3 Replies
Feb 28, 2010
I've tried to use this and I got all the errors gone but two
Private Sub buttonSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonSaveAs.Click
If listViewTracks.SelectedIndices.Count > 0 Then
[Code]....
View 5 Replies
Nov 8, 2011
i keep getting this very wierd problem were i put in audio into my forms and (Design) but when i put in a 4'th song, it stops working and comes up with a error. I havn't limited my audio to how much songs i can play but for some reason it just stops playing them. This code below is the code i use for this form
Public Class Form1
[Code]...
View 7 Replies
Feb 12, 2009
i wanna know how to have an invisible audio playing in the background of your program, as soon as someone opens it should play.
View 3 Replies
Apr 23, 2009
I would like to loop through audio in VB.NET.
Here is my code:
While blnAlert = True
My.Computer.Audio.Play("C:cat_1.wav")
End While
But it freezes the app.
View 2 Replies
Jul 30, 2010
Any code for ripping an audio cd and saving it to drive From .cda audio files to .mp3 or .flac files in vb.net.
View 5 Replies
Aug 29, 2009
I have put some wav audio on the resources. in my form, i have a label. i named the label as s1f1 and s1f2. now i want to play the audio according to the label click. if it is click then the audio play. i dont to put a line of code in every label. assuming that there is a lot of label, then it will be a waste of time. so how can i play the audio, by only write a several line code but for all of the labels.
View 7 Replies
Sep 9, 2009
how can i play more than one wav file at a time? and not at the same time too. can vb.net do this alone without import something else?
View 1 Replies
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
Aug 23, 2009
How can i set a wav audio properties like set the volume, the tempo of the audio. is it possible to do that.?
View 5 Replies