469,270 Members | 1,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Recording at stream

6
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
Jan 8 '09 #1
9 3522
RedSon
5,000 Expert 4TB
@fevos
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?
Jan 8 '09 #2
fevos
6
yeah first thing i try it is that but it does not work , but thanx for replay
Jan 8 '09 #3
RedSon
5,000 Expert 4TB
what error do you get? Or what is the result?
Jan 8 '09 #4
fevos
6
i get an exception in the recorder libary "openNETCF" without details ..
Jan 8 '09 #5
RedSon
5,000 Expert 4TB
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?
Jan 8 '09 #6
fevos
6
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 .
Jan 8 '09 #7
RedSon
5,000 Expert 4TB
what is the object type of "client"?
Jan 9 '09 #8
RedSon
5,000 Expert 4TB
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.
Jan 9 '09 #9
fevos
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 ..
Jan 12 '09 #10

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Sugapablo | last post: by
4 posts views Thread by Lorn | last post: by
3 posts views Thread by Jussi Rasku | last post: by
6 posts views Thread by Dovelet | last post: by
reply views Thread by azdavid | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.