Click here to Skip to main content
15,914,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: Update listview data from db Pin
WebMaster26-Jan-09 5:06
WebMaster26-Jan-09 5:06 
QuestionHelp to capyure video of a capture plate of 4 video entrance Pin
Alex_xso23-Jan-09 6:48
Alex_xso23-Jan-09 6:48 
QuestionIn Program Editor Pin
Xandafergus23-Jan-09 6:46
Xandafergus23-Jan-09 6:46 
AnswerRe: In Program Editor Pin
Not Active23-Jan-09 7:01
mentorNot Active23-Jan-09 7:01 
GeneralRe: In Program Editor Pin
Xandafergus23-Jan-09 7:16
Xandafergus23-Jan-09 7:16 
GeneralRe: In Program Editor Pin
Not Active23-Jan-09 7:23
mentorNot Active23-Jan-09 7:23 
AnswerRe: In Program Editor Pin
malk0lm23-Jan-09 12:31
malk0lm23-Jan-09 12:31 
QuestionStream Audio with Directsound from Buffer in C#??? Pin
hans0123-Jan-09 4:10
hans0123-Jan-09 4:10 
Hello, Community!

I have a problem, that's driving me crazy for days, now...

I have a buffer[] that is filled with data(=WAV) from an external device (NOT a microphone!).
I want to stream the data as soon as a certain amount of data has arrived.
Could somebody, please, tell me, how I can do that (in easy steps!)?
I've tried nearly all the samples here or in the net, already. Most of them use sound files or a capturing device...

At the momemt I can set the SecondaryBuffer to a file, which works fine, but how can I set it to a MemoryStream, for example, and stream that? I would like to have something like that:
for (int i = 0; i < intIncomingDataLength; i++)
{
  rawsamples[j] = (byte)fileStream.ReadByte();
  if ((i>5000)&&(blPlaying==true))
  {
    MemoryStream mystream1 = new MemoryStream(rawsamples,0,intIncomingDataLength, true, true);
    SecondaryBuffer snd = new SecondaryBuffer(mystream1, desc, applicationDevice);
    snd.Play(0, BufferPlayFlags.Looping);
    blPlaying=false;
  }
}

But I always get an "Out of bounds" error, if the SecondaryBuffer is initialized...
I can't download the DirectX SDK in my office, due to company restrictions, either.

Any help is appreciated!!!

Thanks
Hans
AnswerRe: Stream Audio with Directsound from Buffer in C#??? Pin
EliottA23-Jan-09 5:44
EliottA23-Jan-09 5:44 
GeneralRe: Stream Audio with Directsound from Buffer in C#??? Pin
hans0123-Jan-09 6:31
hans0123-Jan-09 6:31 
AnswerRe: Stream Audio with Directsound from Buffer in C#??? Pin
hans0123-Jan-09 22:10
hans0123-Jan-09 22:10 
Questionhow to programatically create a class library using C# compiler Pin
d chase begins23-Jan-09 3:58
d chase begins23-Jan-09 3:58 
AnswerRe: how to programatically create a class library using C# compiler Pin
Pete O'Hanlon23-Jan-09 4:02
mvePete O'Hanlon23-Jan-09 4:02 
GeneralRe: how to programatically create a class library using C# compiler Pin
d chase begins23-Jan-09 4:07
d chase begins23-Jan-09 4:07 
GeneralRe: how to programatically create a class library using C# compiler Pin
Jon Rista23-Jan-09 4:55
Jon Rista23-Jan-09 4:55 
GeneralRe: how to programatically create a class library using C# compiler Pin
d chase begins23-Jan-09 17:03
d chase begins23-Jan-09 17:03 
GeneralRe: how to programatically create a class library using C# compiler Pin
Jon Rista25-Jan-09 9:22
Jon Rista25-Jan-09 9:22 
GeneralRe: how to programatically create a class library using C# compiler Pin
Guffa23-Jan-09 5:12
Guffa23-Jan-09 5:12 
GeneralRe: how to programatically create a class library using C# compiler Pin
d chase begins28-Jan-09 2:42
d chase begins28-Jan-09 2:42 
Question[Message Deleted] Pin
mobius11100123-Jan-09 3:21
mobius11100123-Jan-09 3:21 
AnswerRe: ADO.NET Binary Columns Pin
Wendelius23-Jan-09 3:37
mentorWendelius23-Jan-09 3:37 
GeneralRe: ADO.NET Binary Columns Pin
mobius11100123-Jan-09 3:42
mobius11100123-Jan-09 3:42 
GeneralRe: ADO.NET Binary Columns Pin
Wendelius23-Jan-09 3:58
mentorWendelius23-Jan-09 3:58 
GeneralRe: ADO.NET Binary Columns Pin
mobius11100123-Jan-09 4:04
mobius11100123-Jan-09 4:04 
GeneralRe: ADO.NET Binary Columns Pin
Wendelius23-Jan-09 4:08
mentorWendelius23-Jan-09 4:08 

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.