Skip to content

Commit 91f65da

Browse files
committed
Fix -ringBufferAtIndex: deprecation warning.
1 parent ab4c110 commit 91f65da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NESGameCore.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ - (void)setupEmulation
257257
_bufFrameSize = (SAMPLERATE / self.frameInterval);
258258

259259
_soundBuffer = new int16_t[_bufFrameSize * self.channelCount];
260-
[[self ringBufferAtIndex:0] setLength:(sizeof(int16_t) * _bufFrameSize * self.channelCount * 5)];
260+
//[[self ringBufferAtIndex:0] setLength:(sizeof(int16_t) * _bufFrameSize * self.channelCount * 5)];
261261

262262
memset(_soundBuffer, 0, _bufFrameSize * self.channelCount * sizeof(int16_t));
263263
_nesSound->samples[0] = _soundBuffer;
@@ -270,7 +270,7 @@ - (void)executeFrame
270270
{
271271
_emu.Execute(_nesVideo, _nesSound, _controls);
272272

273-
[[self ringBufferAtIndex:0] write:_soundBuffer maxLength:self.channelCount * _bufFrameSize * sizeof(int16_t)];
273+
[[self audioBufferAtIndex:0] write:_soundBuffer maxLength:self.channelCount * _bufFrameSize * sizeof(int16_t)];
274274
}
275275

276276
- (void)resetEmulation

0 commit comments

Comments
 (0)