Esempio n. 1
0
        public void InitAudio(int freq, int samples, int channels)
        {
            audioCallBack = new Sdl.AudioSpecCallbackDelegate(AudioCallBack);

            Sdl.SDL_AudioSpec s1 = new Sdl.SDL_AudioSpec()
            {
                freq     = freq,
                samples  = (short)samples,
                channels = (byte)channels,
                format   = 0x0010,
                callback = Marshal.GetFunctionPointerForDelegate(audioCallBack),
            };

            Sdl.SDL_AudioSpec s2 = new Sdl.SDL_AudioSpec();
            var p1 = FunctionEx.StructToIntPtr(s1);
            var p2 = FunctionEx.StructToIntPtr(s2);
            var cs = Sdl.SDL_OpenAudio(p1, p2);
        }
Esempio n. 2
0
 public static void SMPEG_actualSpec(IntPtr mpeg, ref Sdl.SDL_AudioSpec spec);