Connecting Tech Pros Worldwide Help | Site Map

Recording at stream

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 8th, 2009, 03:43 PM
Newbie
 
Join Date: Dec 2008
Posts: 6
Default 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),

Expand|Select|Wrap|Line Numbers
  1. ''using openNETCF
  2.  Dim Stream1 As Stream
  3. Stream1 = File.OpenWrite("\My Documents\" & txtFileName.Text & ".wav")
  4. m_Recorder = New OpenNETCF.Media.WaveAudio.Recorder
  5. m_Recorder.RecordFor(Stream1, 5400,OpenNETCF.Media.WaveAudio.SoundFormats.Stereo16bit11kHz) '' accept only i.o stream and record into it
  6.  
The Bluetooth stream I could write byte

Expand|Select|Wrap|Line Numbers
  1. ''using InTheHand 32feet.NET
  2. dim Buffer1 As Byte
  3. Dim stream As System.IO.Stream = Nothing
  4. stream = client.GetStream()  '' return i.o stream 
  5. stream.Write(Buffer1, 0, BufferLen)
  6.  
How to connected them so I could record and write at the same time (could I use memorystream)

Thanks
Reply
  #2  
Old January 8th, 2009, 04:30 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,239
Default

Quote:
Originally Posted by fevos View Post
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),

Expand|Select|Wrap|Line Numbers
  1. ''using openNETCF
  2.  Dim Stream1 As Stream
  3. Stream1 = File.OpenWrite("\My Documents\" & txtFileName.Text & ".wav")
  4. m_Recorder = New OpenNETCF.Media.WaveAudio.Recorder
  5. m_Recorder.RecordFor(Stream1, 5400,OpenNETCF.Media.WaveAudio.SoundFormats.Stereo16bit11kHz) '' accept only i.o stream and record into it
  6.  
The Bluetooth stream I could write byte

Expand|Select|Wrap|Line Numbers
  1. ''using InTheHand 32feet.NET
  2. dim Buffer1 As Byte
  3. Dim stream As System.IO.Stream = Nothing
  4. stream = client.GetStream()  '' return i.o stream 
  5. stream.Write(Buffer1, 0, BufferLen)
  6.  
How to connected them so I could record and write at the same time (could I use memorystream)

Thanks
Have you tried
Expand|Select|Wrap|Line Numbers
  1. 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?
Reply
  #3  
Old January 8th, 2009, 06:21 PM
Newbie
 
Join Date: Dec 2008
Posts: 6
Default

yeah first thing i try it is that but it does not work , but thanx for replay
Reply
  #4  
Old January 8th, 2009, 06:23 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,239
Default

what error do you get? Or what is the result?
Reply
  #5  
Old January 8th, 2009, 06:42 PM
Newbie
 
Join Date: Dec 2008
Posts: 6
Default

i get an exception in the recorder libary "openNETCF" without details ..
Reply
  #6  
Old January 8th, 2009, 06:47 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,239
Default

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?
Reply
  #7  
Old January 8th, 2009, 06:59 PM
Newbie
 
Join Date: Dec 2008
Posts: 6
Default

yes this the link openNETCF wav(i use recorder), and this the link for 32feet.net theat return client stream ,,,thanx man i appreciate your help .
Reply
  #8  
Old January 9th, 2009, 07:51 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,239
Default

what is the object type of "client"?
Reply
  #9  
Old January 9th, 2009, 07:55 PM
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,239
Default

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.
Reply
  #10  
Old January 12th, 2009, 05:22 AM
Newbie
 
Join Date: Dec 2008
Posts: 6
Default

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 ..
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

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.