Click here to Skip to main content
16,004,974 members
Home / Discussions / C#
   

C#

 
QuestionMerge cells in word 2003 Pin
Larza1238-Jun-07 9:50
Larza1238-Jun-07 9:50 
AnswerRe: Merge cells in word 2003 Pin
Goalie358-Jun-07 10:27
Goalie358-Jun-07 10:27 
GeneralRe: Merge cells in word 2003 Pin
Larza12315-Jul-07 23:56
Larza12315-Jul-07 23:56 
AnswerRe: Merge cells in word 2003 Pin
wowo60823-Apr-09 0:07
wowo60823-Apr-09 0:07 
Questionprinting html file without printdialog show up Pin
pnpfriend8-Jun-07 9:16
pnpfriend8-Jun-07 9:16 
AnswerRe: printing html file without printdialog show up Pin
turbochimp9-Jun-07 6:42
turbochimp9-Jun-07 6:42 
QuestionDirectSound with not ending stream Pin
Dirk Reske8-Jun-07 8:52
Dirk Reske8-Jun-07 8:52 
AnswerRe: DirectSound with not ending stream Pin
Leslie Sanford8-Jun-07 16:45
Leslie Sanford8-Jun-07 16:45 
Freak.2k wrote:
I've derived Stream class to receive an internet audio stream.
But the DirectSound class can't play this because of the missing length and position informations.
But I don't have this, because the stream has no end!


1) Create a SecondaryBuffer object.

2) Set the length to some amount, say 8192, for example.

3) Create two arrays, each with a length half as long as the length of the SecondaryBuffer.

4) Initialize the buffer with Notify objects to notify you when the buffer reaches position 0 and half the length of the buffer.

5) Read data from your stream and place it into the first array.

6) Write the array data to the SecondaryBuffer.

7) Play the SecondaryBuffer with the looping option.

8) As you get notified by the SecondaryBuffer read another array from your stream and write it to the buffer.

This should work ok as long as your stream is staying ahead of your buffer, no guarrantees since this is an internet audio stream, so you may want to make the arrays large enough to give the internet stream a good head start. And be prepared to handle the situation when there are no bytes yet available from your stream.

Hope this helps.
QuestionHow can I remove the repeated items from an Array? Pin
Khoramdin8-Jun-07 7:19
Khoramdin8-Jun-07 7:19 
AnswerRe: How can I remove the repeated items from an Array? [modified] Pin
eggsovereasy8-Jun-07 7:37
eggsovereasy8-Jun-07 7:37 
GeneralRe: How can I remove the repeated items from an Array? Pin
Guffa8-Jun-07 10:22
Guffa8-Jun-07 10:22 
GeneralRe: How can I remove the repeated items from an Array? Pin
eggsovereasy8-Jun-07 11:02
eggsovereasy8-Jun-07 11:02 
AnswerRe: How can I remove the repeated items from an Array? Pin
Judah Gabriel Himango8-Jun-07 7:44
sponsorJudah Gabriel Himango8-Jun-07 7:44 
GeneralRe: How can I remove the repeated items from an Array? Pin
eggsovereasy8-Jun-07 9:10
eggsovereasy8-Jun-07 9:10 
GeneralRe: How can I remove the repeated items from an Array? Pin
S. Senthil Kumar9-Jun-07 5:49
S. Senthil Kumar9-Jun-07 5:49 
GeneralRe: How can I remove the repeated items from an Array? Pin
Judah Gabriel Himango10-Jun-07 8:06
sponsorJudah Gabriel Himango10-Jun-07 8:06 
QuestionCheck XML Document for Well Formness Pin
Ronakkumar Patel8-Jun-07 6:02
Ronakkumar Patel8-Jun-07 6:02 
QuestionWebClient with Credentials.. Pin
Ronakkumar Patel8-Jun-07 6:00
Ronakkumar Patel8-Jun-07 6:00 
QuestionHow to block cookies during HTTP Get or Post operation Pin
Ronakkumar Patel8-Jun-07 5:59
Ronakkumar Patel8-Jun-07 5:59 
QuestionGet list of exported functions from Unmanaged DLL Pin
Ronakkumar Patel8-Jun-07 5:57
Ronakkumar Patel8-Jun-07 5:57 
QuestionAlternative to Socket? Pin
Hamed Musavi8-Jun-07 5:50
Hamed Musavi8-Jun-07 5:50 
AnswerRe: Alternative to Socket? Pin
Not Active8-Jun-07 5:55
mentorNot Active8-Jun-07 5:55 
GeneralRe: Alternative to Socket? Pin
Hamed Musavi8-Jun-07 6:19
Hamed Musavi8-Jun-07 6:19 
AnswerRe: Alternative to Socket? Pin
Judah Gabriel Himango8-Jun-07 6:00
sponsorJudah Gabriel Himango8-Jun-07 6:00 
GeneralRe: Alternative to Socket? Pin
Hamed Musavi8-Jun-07 6:16
Hamed Musavi8-Jun-07 6:16 

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.