Ho fatto qualche ricerca, e ho scritto questo codice:

codice:
using System;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectSound;
using DS = Microsoft.DirectX.DirectSound;



class Classe1 : System.Windows.Forms.Form
{
    private DS.Device sounddevice;
    private SecondaryBuffer shotsound;
 
    static void Main()
    {
        System.IO.Stream data = System.IO.Stream.Null;
        Classe1 class1 = new Classe1();
        int a = 0;
        class1.sounddevice = new DS.Device();
        class1.sounddevice.SetCooperativeLevel(class1, CooperativeLevel.Normal);


        BufferDescription description = new BufferDescription();
        description.ControlEffects = false;
        class1.shotsound = new SecondaryBuffer("suono1.wav", description, class1.sounddevice);

//        class1.shotsound.Play(0, BufferPlayFlags.Default);


        while (a != -1)
        {
            class1.shotsound.Read(0, data, 1, LockFlag.None);
            a = data.ReadByte();
            Console.WriteLine(a);
        }
        Console.ReadLine();
    }
}
Mi sarei aspettato di vedere stampati su schermo dei numeri rappresentanti i byte letti dal file wave, ma così non è stato. Viene stampato solo un -1 (quindi il buffer è sempre vuoto).

Se tolgo il flag di commento dalla riga
class1.shotsound.Play(0, BufferPlayFlags.Default);
sento suonare il file wav, quindi non tutto quello che ho fatto dovrebbe essere sbagliato .

Mi sapete dire come fare per ottenere quello che voglio?

Il prossimo passo sarà cercare di leggere lo stream audio direttamente dalla porta microfono...

Grazie a tutti.

Ciao