Cocoa OpenEmu Plug-in:

- Update method names to match the newest revision of the OEGameCore API.
- Return audioBufferCount==0 since we're using DeSmuME's sound handling code for now.
- Change the 3D rendering core to the null core on dealloc.
This commit is contained in:
rogerman 2012-03-03 21:18:27 +00:00
parent 0b00a16f4e
commit 18a5907a1e
1 changed files with 17 additions and 29 deletions

View File

@ -95,7 +95,7 @@
free(input); free(input);
SPU_ChangeSoundCore(SNDCORE_DUMMY, 0); SPU_ChangeSoundCore(SNDCORE_DUMMY, 0);
NDS_3D_ChangeCore(CORE3DLIST_SWRASTERIZE); NDS_3D_ChangeCore(CORE3DLIST_NULL);
[CocoaDSCore shutdownCore]; [CocoaDSCore shutdownCore];
self.firmware = nil; self.firmware = nil;
@ -185,11 +185,17 @@
return GL_RGB5_A1; return GL_RGB5_A1;
} }
- (NSTimeInterval)frameInterval
{
return DS_FRAMES_PER_SECOND;
}
#pragma mark Audio #pragma mark Audio
- (NSUInteger)soundBufferCount - (NSUInteger)audioBufferCount
{ {
return 1; //return 1;
return 0;
} }
- (void)getAudioBuffer:(void *)buffer frameCount:(NSUInteger)frameCount bufferIndex:(NSUInteger)index - (void)getAudioBuffer:(void *)buffer frameCount:(NSUInteger)frameCount bufferIndex:(NSUInteger)index
@ -201,7 +207,7 @@
//if (openEmuSoundInterfaceBuffer != NULL) //if (openEmuSoundInterfaceBuffer != NULL)
//{ //{
// openEmuSoundInterfaceBuffer->read(buffer, frameCount * SPU_BUFFER_BYTES); // openEmuSoundInterfaceBuffer->read(buffer, frameCount * SPU_SAMPLE_SIZE);
//} //}
} }
@ -211,24 +217,10 @@
return 0; return 0;
} }
- (NSUInteger)frameSampleCount - (double)audioSampleRate
{
//static NSUInteger count = (NSUInteger)(SPU_SAMPLE_RATE / DS_FRAMES_PER_SECOND) + 1;
static NSUInteger count = 0;
return count;
}
- (NSUInteger)soundBufferSize
{
//return SPU_BUFFER_BYTES;
return 0;
}
- (NSUInteger)frameSampleRate
{ {
//return SPU_SAMPLE_RATE; //return SPU_SAMPLE_RATE;
return 0; return 0.0;
} }
- (NSUInteger)channelCountForBuffer:(NSUInteger)buffer - (NSUInteger)channelCountForBuffer:(NSUInteger)buffer
@ -236,19 +228,15 @@
return [self channelCount]; return [self channelCount];
} }
- (NSUInteger)frameSampleCountForBuffer:(NSUInteger)buffer - (NSUInteger)audioBufferSizeForBuffer:(NSUInteger)buffer
{ {
return [self frameSampleCount]; //return (SPU_BUFFER_BYTES * 2);
return 0;
} }
- (NSUInteger)soundBufferSizeForBuffer:(NSUInteger)buffer - (double)audioSampleRateForBuffer:(NSUInteger)buffer
{ {
return [self soundBufferSize]; return [self audioSampleRate];
}
- (NSUInteger)frameSampleRateForBuffer:(NSUInteger)buffer
{
return [self frameSampleRate];
} }