Exemplo n.º 1
0
        // returns -101 for firmware version error
        unsafe public static int StartAudio(int sample_rate, int samples_per_block, PA19.PaStreamCallback cb, int sample_bits, int no_send)
        {
            if (initOzy() != 0)
            {
                return(1);
            }
            int result = StartAudioNative(sample_rate, samples_per_block, cb, sample_bits, no_send);

            if (result == 0 && !fwVersionsChecked)
            {
                Thread.Sleep(100);                 // wait for frames
                if (!fwVersionsGood())
                {
                    result = -101;
                }
                else
                {
                    fwVersionsChecked = true;
                }
            }
            return(result);
        }
Exemplo n.º 2
0
        unsafe public static int StartAudio(int sample_rate, int samples_per_block, PA19.PaStreamCallback cb, int sample_bits, int no_send)
        {
            if (!isOzyInitialized)
            {
                // int rc;
                // oz_start();
                // rc = JanusOzyIO.getJanusOzy().init();
                // System.Console.WriteLine("JanusOzyIO.init returned: " + rc);

                // if ( rc != 0 )
                // {
                //	return 1;
                // }


                if (initOzy() != 0)
                {
                    return(1);
                }
                isOzyInitialized = true;
            }
            return(StartAudioNative(sample_rate, samples_per_block, cb, sample_bits, no_send));
        }
Exemplo n.º 3
0
 unsafe public static extern int StartAudioNative(int sample_rate, int samples_per_block, PA19.PaStreamCallback cb, int sample_bits, int no_send);
Exemplo n.º 4
0
 public static extern int StartAudioNative(PA19.PaStreamCallback cb);