Click here to Skip to main content
15,919,358 members
Home / Discussions / C#
   

C#

 
AnswerRe: Update requires a valid UpdateCommand when passed DataRow collection with modified rows. Pin
nelsonpaixao8-Oct-08 12:47
nelsonpaixao8-Oct-08 12:47 
QuestionProblem with free up memory! Pin
Ha ha ha ha ha ha ha ha7-Oct-08 23:24
Ha ha ha ha ha ha ha ha7-Oct-08 23:24 
AnswerRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 0:11
Simon P Stevens8-Oct-08 0:11 
GeneralRe: Problem with free up memory! Pin
leppie8-Oct-08 1:53
leppie8-Oct-08 1:53 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha8-Oct-08 1:54
Ha ha ha ha ha ha ha ha8-Oct-08 1:54 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 3:06
Simon P Stevens8-Oct-08 3:06 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha8-Oct-08 3:51
Ha ha ha ha ha ha ha ha8-Oct-08 3:51 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 4:42
Simon P Stevens8-Oct-08 4:42 
No, your missing the point.

What you are doing is creating a new buffer every time you loop round. The sound processor is then queuing all of these buffers and playing them in order. Thus, you are getting a clear uninterrupted sound, but at the same time you are creating hundreds of buffer objects that are just forming a longer and longer queue.

What you should be doing is adding the data onto the end of the same buffer each time you go round the loop. This way the sound processor will continually play out of the same buffer as it will never run out of data because you are continually adding more data into the buffer.

My solution will stop the jittering because I am suggesting that you only need to call play once at the beginning. Provided that your source continues to send, you will never need to call play again. The 5 second counter is there to prevent play being called before there is anything in the buffer to begin with. And the flag is there so that play isn't called again. You will only need to call play again if the buffer runs out and stops (maybe you have network trouble, or the source stops for some reason, so if this happens, then flag is reset, and the code will wait until the buffer has 5 seconds in it before calling play() again)

Simon

GeneralRe: Problem with free up memory! Pin
DaveyM698-Oct-08 5:58
professionalDaveyM698-Oct-08 5:58 
GeneralRe: Problem with free up memory! Pin
Simon P Stevens8-Oct-08 22:58
Simon P Stevens8-Oct-08 22:58 
GeneralRe: Problem with free up memory! [modified] Pin
Mark Salsbery8-Oct-08 8:07
Mark Salsbery8-Oct-08 8:07 
GeneralRe: Problem with free up memory! Pin
Ha ha ha ha ha ha ha ha9-Oct-08 20:50
Ha ha ha ha ha ha ha ha9-Oct-08 20:50 
QuestionGet a whole column in a matrix Pin
xkrja7-Oct-08 21:37
xkrja7-Oct-08 21:37 
AnswerRe: Get a whole column in a matrix Pin
User 66587-Oct-08 21:48
User 66587-Oct-08 21:48 
QuestionHow to get whitespace in xml Pin
manju#1237-Oct-08 19:52
manju#1237-Oct-08 19:52 
AnswerRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 20:18
Pedram Behroozi7-Oct-08 20:18 
GeneralRe: How to get whitespace in xml Pin
manju#1237-Oct-08 20:23
manju#1237-Oct-08 20:23 
GeneralRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 20:29
Pedram Behroozi7-Oct-08 20:29 
GeneralRe: How to get whitespace in xml [modified] Pin
manju#1237-Oct-08 20:57
manju#1237-Oct-08 20:57 
GeneralRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 22:47
Pedram Behroozi7-Oct-08 22:47 
GeneralRe: How to get whitespace in xml Pin
Ashfield7-Oct-08 23:10
Ashfield7-Oct-08 23:10 
GeneralRe: How to get whitespace in xml Pin
leppie7-Oct-08 23:46
leppie7-Oct-08 23:46 
GeneralRe: How to get whitespace in xml Pin
Pedram Behroozi7-Oct-08 22:53
Pedram Behroozi7-Oct-08 22:53 
AnswerRe: How to get whitespace in xml Pin
PIEBALDconsult8-Oct-08 3:38
mvePIEBALDconsult8-Oct-08 3:38 
Questionopening selected file in seperate window Pin
Chithra Anoop7-Oct-08 18:37
Chithra Anoop7-Oct-08 18:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.