Recording at stream 
January 8th, 2009, 03:43 PM
| | Newbie | | Join Date: Dec 2008
Posts: 6
| | Recording at stream
Hi
i want to record voice and send it throw Bluetooth stream , the problem is the recorder accepts only I.O Stream
And write at the 'stream' without using (stream.write), -
''using openNETCF
-
Dim Stream1 As Stream
-
Stream1 = File.OpenWrite("\My Documents\" & txtFileName.Text & ".wav")
-
m_Recorder = New OpenNETCF.Media.WaveAudio.Recorder
-
m_Recorder.RecordFor(Stream1, 5400,OpenNETCF.Media.WaveAudio.SoundFormats.Stereo16bit11kHz) '' accept only i.o stream and record into it
-
The Bluetooth stream I could write byte -
''using InTheHand 32feet.NET
-
dim Buffer1 As Byte
-
Dim stream As System.IO.Stream = Nothing
-
stream = client.GetStream() '' return i.o stream
-
stream.Write(Buffer1, 0, BufferLen)
-
How to connected them so I could record and write at the same time (could I use memorystream)
Thanks
| 
January 8th, 2009, 04:30 PM
|  | Site Moderator | | Join Date: Jan 2007 Location: America
Posts: 3,239
| | Quote:
Originally Posted by fevos Hi
i want to record voice and send it throw Bluetooth stream , the problem is the recorder accepts only I.O Stream
And write at the 'stream' without using (stream.write), -
''using openNETCF
-
Dim Stream1 As Stream
-
Stream1 = File.OpenWrite("\My Documents\" & txtFileName.Text & ".wav")
-
m_Recorder = New OpenNETCF.Media.WaveAudio.Recorder
-
m_Recorder.RecordFor(Stream1, 5400,OpenNETCF.Media.WaveAudio.SoundFormats.Stereo16bit11kHz) '' accept only i.o stream and record into it
-
The Bluetooth stream I could write byte -
''using InTheHand 32feet.NET
-
dim Buffer1 As Byte
-
Dim stream As System.IO.Stream = Nothing
-
stream = client.GetStream() '' return i.o stream
-
stream.Write(Buffer1, 0, BufferLen)
-
How to connected them so I could record and write at the same time (could I use memorystream)
Thanks | Have you tried -
m_Recorder.RecordFor(client.GetStream(), 5400,OpenNETCF.Media.WaveAudio.SoundFormats.Stereo16bit11kHz)
Just replace the file writer stream with the IO stream. Wouldn't that work?
| 
January 8th, 2009, 06:21 PM
| | Newbie | | Join Date: Dec 2008
Posts: 6
| |
yeah first thing i try it is that but it does not work , but thanx for replay
| 
January 8th, 2009, 06:23 PM
|  | Site Moderator | | Join Date: Jan 2007 Location: America
Posts: 3,239
| |
what error do you get? Or what is the result?
| 
January 8th, 2009, 06:42 PM
| | Newbie | | Join Date: Dec 2008
Posts: 6
| |
i get an exception in the recorder libary "openNETCF" without details ..
| 
January 8th, 2009, 06:47 PM
|  | Site Moderator | | Join Date: Jan 2007 Location: America
Posts: 3,239
| |
wait if Client.GetStream() returns an IO stream and OpenNETCF.Media.WaveAudio.Recorder.RecordFor(...) takes and IO stream as it's first argument then what is the problem?
Do you have some documentation for the openNETCF package?
| 
January 9th, 2009, 07:51 PM
|  | Site Moderator | | Join Date: Jan 2007 Location: America
Posts: 3,239
| |
what is the object type of "client"?
| 
January 9th, 2009, 07:55 PM
|  | Site Moderator | | Join Date: Jan 2007 Location: America
Posts: 3,239
| |
Nevermind I found it. client.GetStream() returns a type of NetworkStream which is a type of IO stream but I think you should try explicitly casting it as an IO stream.
| 
January 12th, 2009, 05:22 AM
| | Newbie | | Join Date: Dec 2008
Posts: 6
| |
thanks man , but it give me the same exception , i start new thread about Waveform Audio that record to buffer i hope I'll get your help there thank u so much ..
|  | | Thread Tools | Search this Thread | | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,662 network members.
|