N64: Added a function to get the audio rate from the core.
This commit is contained in:
parent
0d556dc9e9
commit
533baf9ef3
|
@ -214,6 +214,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
|||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate void ReadAudioBuffer(short[] dest);
|
||||
ReadAudioBuffer AudReadAudioBuffer;
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
private delegate int GetAudioRate();
|
||||
GetAudioRate AudGetAudioRate;
|
||||
|
||||
// This has the same calling pattern for all the plugins
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
|
@ -288,6 +291,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
|||
AudPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "PluginStartup"), typeof(PluginStartup));
|
||||
AudGetBufferSize = (GetBufferSize)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "GetBufferSize"), typeof(GetBufferSize));
|
||||
AudReadAudioBuffer = (ReadAudioBuffer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "ReadAudioBuffer"), typeof(ReadAudioBuffer));
|
||||
AudGetAudioRate = (GetAudioRate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "GetAudioRate"), typeof(GetAudioRate));
|
||||
|
||||
RspPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(RspDll, "PluginStartup"), typeof(PluginStartup));
|
||||
|
||||
|
|
Binary file not shown.
|
@ -745,4 +745,9 @@ EXPORT void CALL ReadAudioBuffer(short* dest)
|
|||
EXPORT int CALL GetBufferSize()
|
||||
{
|
||||
return buffer_pos/2;
|
||||
}
|
||||
|
||||
EXPORT int CALL GetAudioRate()
|
||||
{
|
||||
return GameFreq;
|
||||
}
|
Loading…
Reference in New Issue