unsafe public static void createWavePlayer(int id) { // create a wave player instance wplayer[id] = new PlayWave(); // store the pointer to the wave player instance pplay[id] = new WPlay(wplayer[id].wplay); // send the pointer over to the C code SendCBWavePlayer(id, pplay[id]); // tell the waveplayer its ID wplayer[id].ID = id; // NOTE: the wave_file_reader instance gets created in OpenWaveFile(filename, id) }
unsafe public static extern void SendCBWavePlayer(int id, WPlay del);