windows phone 7 - microphone buffer becomes 0 after device back key press in WP7 -
i have microphone object record sound. byte buffer array gives me correct result if on same xaml file.
but once press key , come same page again, buffer contains 0 in every array member.
in constructor, have following code:
this.microphone.getdata(buffer);
in button click handler, have following code:
// stop running microphone if (this.microphone.state == microphonestate.started) { this.microphone.stop(); } // clear previous content of microphone this.microphone.bufferduration = timespan.frommilliseconds(1000); this.microphone.start(); // store recorded audio this.buffer = new byte[this.microphone.getsamplesizeinbytes(this.microphone.bufferduration)];
is there problem using microphone class? cleared or after coming device button press?
thanks in advance. please let me know if there doubt in question.
if start microphone on page navigate away backwards it, page destroyed, along buffered recording. when next navigate page new instance of created along new microphone (and stream/buffer).
is scenario?
if i'd create microphone @ application level doesn't risk being impacted navigation between pages in app.
Comments
Post a Comment