Ejemplo n.º 1
0
        private int _sceAudioOutputPannedBlocking(PspAudioChannel Channel, int LeftVolume, int RightVolume,
                                                  short *Buffer, bool Blocking)
        {
            ThreadManager.Current.SetWaitAndPrepareWakeUp(HleThread.WaitType.Audio,
                                                          $"_sceAudioOutputPannedBlocking({Channel}, Volume({LeftVolume}, {RightVolume}), Blocking({Blocking}))", Channel, WakeUpCallback =>
            {
                Channel.Write(Buffer, LeftVolume, RightVolume, () =>
                {
                    if (Blocking)
                    {
                        WakeUpCallback();
                    }
                });

                /*
                 * if (Blocking)
                 * {
                 *  PspRtc.RegisterTimerInOnce(TimeSpan.FromMilliseconds(1), () =>
                 *  {
                 *      WakeUpCallback();
                 *  });
                 * }
                 */
                if (!Blocking)
                {
                    WakeUpCallback();
                }
            });
            return(Channel.SampleCount);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Channel"></param>
 /// <returns></returns>
 public int _sceAudioChRelease(PspAudioChannel Channel)
 {
     Channel.Available = true;
     //throw (new NotImplementedException());
     return(0);
 }