forked from mgba-emu/mgba
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
186 changed files
with
5,016 additions
and
4,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": 3, | ||
"configurePresets": [ | ||
{ | ||
"name": "clang", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug", | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
} | ||
}, | ||
{ | ||
"name": "gcc", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug", | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-195 Bytes
(86%)
cinema/gb/samesuite/apu/channel_1/nrx2_speed_change/xbaseline_0000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-201 Bytes
(86%)
cinema/gb/samesuite/apu/channel_2/nrx2_speed_change/xbaseline_0000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* Copyright (c) 2013-2024 Jeffrey Pfau | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
#ifndef M_AUDIO_BUFFER_H | ||
#define M_AUDIO_BUFFER_H | ||
|
||
#include <mgba-util/common.h> | ||
|
||
CXX_GUARD_START | ||
|
||
#include <mgba-util/circle-buffer.h> | ||
|
||
struct mAudioBuffer { | ||
struct mCircleBuffer data; | ||
unsigned channels; | ||
}; | ||
|
||
void mAudioBufferInit(struct mAudioBuffer* buffer, size_t capacity, unsigned channels); | ||
void mAudioBufferDeinit(struct mAudioBuffer* buffer); | ||
|
||
size_t mAudioBufferAvailable(const struct mAudioBuffer* buffer); | ||
size_t mAudioBufferCapacity(const struct mAudioBuffer* buffer); | ||
|
||
void mAudioBufferClear(struct mAudioBuffer* buffer); | ||
int16_t mAudioBufferPeek(const struct mAudioBuffer* buffer, unsigned channel, size_t offset); | ||
size_t mAudioBufferDump(const struct mAudioBuffer* buffer, int16_t* samples, size_t count, size_t offset); | ||
size_t mAudioBufferRead(struct mAudioBuffer* buffer, int16_t* samples, size_t count); | ||
size_t mAudioBufferWrite(struct mAudioBuffer* buffer, const int16_t* samples, size_t count); | ||
|
||
CXX_GUARD_END | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* Copyright (c) 2013-2024 Jeffrey Pfau | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
#ifndef M_AUDIO_RESAMPLER_H | ||
#define M_AUDIO_RESAMPLER_H | ||
|
||
#include <mgba-util/common.h> | ||
|
||
CXX_GUARD_START | ||
|
||
#include <mgba-util/interpolator.h> | ||
|
||
struct mAudioBuffer; | ||
struct mAudioResampler { | ||
struct mAudioBuffer* source; | ||
struct mAudioBuffer* destination; | ||
double sourceRate; | ||
double destRate; | ||
double timestamp; | ||
double lowWaterMark; | ||
double highWaterMark; | ||
enum mInterpolatorType interpType; | ||
union { | ||
struct mInterpolator interp; | ||
struct mInterpolatorSinc sinc; | ||
struct mInterpolatorCosine cosine; | ||
}; | ||
bool consume; | ||
}; | ||
|
||
void mAudioResamplerInit(struct mAudioResampler*, enum mInterpolatorType); | ||
void mAudioResamplerDeinit(struct mAudioResampler*); | ||
void mAudioResamplerSetSource(struct mAudioResampler*, struct mAudioBuffer* source, double rate, bool consume); | ||
void mAudioResamplerSetDestination(struct mAudioResampler*, struct mAudioBuffer* destination, double rate); | ||
size_t mAudioResamplerProcess(struct mAudioResampler*); | ||
|
||
CXX_GUARD_END | ||
|
||
#endif | ||
|
Oops, something went wrong.