-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pan and IRateConverters #281
Conversation
WalkthroughThe changes primarily involve renaming and reorganizing functions and variables related to audio processing in the sdl2-hyper-sonic-drivers project. The Changes
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (5)
- sdl2-hyper-sonic-drivers/examples/pcm-example.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/CopyRateConverter.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/LinearRateConverter.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/SimpleRateConverter.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/mixer/Channel.cpp (1 hunks)
Files skipped from review due to trivial changes (1)
- sdl2-hyper-sonic-drivers/examples/pcm-example.cpp
Additional comments: 1
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/SimpleRateConverter.hpp (1)
- 95-101: Ensure that the
reverseStereo
flag is being set correctly throughout the codebase. Also, verify that the swapping of channels doesn't cause any unintended side effects in the audio output.
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/CopyRateConverter.hpp
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/converters/LinearRateConverter.hpp
Show resolved
Hide resolved
@coderabbitai help |
CodeRabbit Commands
|
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 7
Configuration used: CodeRabbit UI
Files selected for processing (39)
- CMakeLists.txt (1 hunks)
- sdl2-hyper-sonic-drivers/examples/adl-example.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/examples/mid-example.h (1 hunks)
- sdl2-hyper-sonic-drivers/examples/mt32-example.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/examples/pcm-example.cpp (3 hunks)
- sdl2-hyper-sonic-drivers/sdl2-hyper-sonic-drivers.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/IMixer.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/IMixer.hpp (3 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/mixer/Channel.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.cpp (6 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.hpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Renderer.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/IAudioDriver.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/MIDDriver.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/MIDDriver.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/PCMDriver.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/PCMDriver.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/westwood/ADLDriver.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/westwood/ADLDriver.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp (4 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/IHardware.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/PCSpeaker.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/PCSpeaker.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/mt32/MT32.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/OPL.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/mame/MameOPL3.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/dosbox/DosBoxOPL.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/mame/MameOPL2.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/nuked/NukedOPL3.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/woody/WoodyOPL.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/audio/IMixerMock.hpp (2 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/audio/sdl2/TestRenderer.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestIAudioDriver.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestMIDDriver.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestPCMDriver.cpp (4 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/hardware/TestPCSpeaker.cpp (2 hunks)
Files skipped from review due to trivial changes (11)
- CMakeLists.txt
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/PCMDriver.hpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/westwood/ADLDriver.hpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/PCSpeaker.hpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/dosbox/DosBoxOPL.cpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/nuked/NukedOPL3.cpp
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestIAudioDriver.cpp
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/hardware/TestPCSpeaker.cpp
Additional comments: 46
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/MIDDriver.hpp (1)
- 46-46: Ensure that all calls to this function throughout the codebase have been updated to match the new signature.
- bool isPlaying() const noexcept override; + bool isActive() const noexcept override;sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestMIDDriver.cpp (1)
- 88-101: The
isPlaying
method has been renamed toisActive
. Ensure that this change is reflected throughout the codebase and that the new method name accurately represents its functionality. Also, verify that the change does not affect the logic of the test case.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/PCSpeaker.cpp (1)
- 90-96: The function
isPlaying
has been renamed toisActive
. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/westwood/ADLDriver.cpp (1)
- 253-259: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [256-260]
The function
isPlaying
has been renamed toisActive
. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/mt32/MT32.cpp (1)
- 131-136: Ensure that the change from
m_mixer->getOutputRate()
tom_mixer->freq
is intentional and thatm_mixer->freq
is always initialized before this call. This change could affect the audio stream configuration.- m_mixer->getOutputRate() + m_mixer->freqsdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/MIDDriver.cpp (1)
- 234-240: The function name
isPlaying
has been changed toisActive
. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/IAudioDriver.hpp (1)
- 33-33: Ensure that all calls to the previous
isPlaying()
function throughout the codebase have been updated toisActive()
. Also, verify that the newisActive()
function's behavior aligns with the intended use in all contexts where it's called.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.hpp (2)
32-50: The new and renamed functions should be reflected in the documentation and all places where these functions are called should be updated accordingly. Also, ensure that the new
reset
function is implemented correctly and that it doesn't introduce any side effects.64-65: Moving
updateChannelsVolumePan_
to the protected section might affect its accessibility in derived classes or friend classes. Ensure that this change doesn't break any existing functionality.sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/audio/sdl2/TestRenderer.cpp (1)
- 63-69: Ensure that the change from
isPlaying()
toisActive()
does not alter the expected behavior of the loop. IfisActive()
has a different implementation, it might cause the loop to run longer or shorter than intended.- while (drv1.isPlaying()) + while (drv1.isActive())sdl2-hyper-sonic-drivers/examples/mt32-example.cpp (1)
- 44-50: The change from
middrv.isPlaying()
tomiddrv.isActive()
may alter the behavior of the loop. Ensure that theisActive()
function provides the expected behavior in this context.- while (middrv.isPlaying()) + while (middrv.isActive())sdl2-hyper-sonic-drivers/examples/adl-example.cpp (1)
- 62-65: Ensure that the change from
isPlaying()
toisActive()
does not introduce any unintended side effects. The loop now continues while the driver is active rather than playing, which might alter the behavior of the loop.- } while (adlDrv.isPlaying()); + } while (adlDrv.isActive());sdl2-hyper-sonic-drivers/sdl2-hyper-sonic-drivers.cpp (2)
62-70: The
isPlaying()
function has been replaced withisActive()
. Ensure that this change is reflected throughout the codebase and that the new function provides the expected behavior.404-410: The
isPlaying()
function has been replaced withisActive()
. Ensure that this change is reflected throughout the codebase and that the new function provides the expected behavior.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Renderer.cpp (1)
- 26-30: The change from
m_mixer->getBufferSize()
tom_mixer->buffer_size
is noted. Ensure thatm_mixer->buffer_size
is always correctly initialized before this call. Also, verify that this change doesn't affect the rest of the codebase wheregetBufferSize()
might have been used.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/OPL.cpp (1)
- 33-38: Ensure that
m_mixer->freq
is correctly initialized and has the expected value before passing it to theEmulatedStream
constructor. Also, verify that the change fromm_mixer->getOutputRate()
tom_mixer->freq
doesn't introduce any issues, as it alters the frequency at which the audio stream's callback is initialized.sdl2-hyper-sonic-drivers/examples/mid-example.h (1)
- 32-37: The change from
isPlaying()
toisActive()
may alter the behavior of the loop. Ensure that theisActive()
method in theMIDDriver
class accurately reflects the desired state for this loop to continue.- while (midDrv.isPlaying()) { + while (midDrv.isActive()) { utils::delayMillis(1000); }sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/audio/IMixerMock.hpp (3)
34-36: Ensure that all calls to the
reset
function throughout the codebase have been updated to match the new overloads.44-47: Ensure that all calls to the
isActive
function throughout the codebase have been updated to match the new overloads.63-63: The new function
updateChannelsVolumePan_
has been added. Ensure that it is being used correctly in the codebase.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp (2)
13-19: The switch statement now uses the local variable
bitsDepth
instead of the member variablem_bitsDepth
. Ensure thatbitsDepth
is correctly initialized and updated before this switch statement.30-36: The
PCMSound
object is now constructed using the local variablefreq
instead of the member variablem_sampleRate
. Ensure thatfreq
is correctly initialized and updated before this object creation.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/woody/WoodyOPL.cpp (1)
- 20-27: Ensure that the
m_mixer->freq
is always initialized before these lines of code are executed. Ifm_mixer->freq
is not initialized, it could lead to undefined behavior.sdl2-hyper-sonic-drivers/examples/pcm-example.cpp (3)
42-46: The loop condition has been changed from
drv.isPlaying(wavSound)
todrv.isActive(wavSound)
. Ensure that theisActive
function provides the expected behavior in this context.51-55: The loop condition has been changed from
drv.isPlaying(vocSound)
todrv.isActive(vocSound)
. Ensure that theisActive
function provides the expected behavior in this context.70-73: The loop condition has been changed from
drv.isPlaying()
todrv.isActive()
. Ensure that theisActive
function provides the expected behavior in this context.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/IMixer.cpp (3)
8-13: The constructor is now initializing
freq
andbuffer_size
directly. Ensure that all calls to this constructor throughout the codebase have been updated to match the new signature.20-24: The
setChannelGroupVolume
function now callsupdateChannelsVolumePan_
. Ensure that this does not introduce any side effects or performance issues, especially ifsetChannelGroupVolume
is called frequently.26-35: Two new functions,
getChannelGroupPan
andsetChannelGroupPan
, have been added. Ensure that these functions are used correctly throughout the codebase and that their error handling (if any) is appropriate.sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/drivers/TestPCMDriver.cpp (4)
20-31: The function
isPlaying
has been replaced withisActive
. Ensure that this change is reflected throughout the codebase and that the new functionisActive
is correctly implemented.41-52: The
stop
function now accepts an optional parameter. Ensure that this change is correctly implemented and reflected throughout the codebase.62-73: The
stop
function is called without any parameters. Ensure that the function is correctly implemented to handle this case.89-100: The function
isActive
is called after thestop
function. Ensure that theisActive
function correctly reflects the state of the driver after thestop
function is called.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/IMixer.hpp (4)
16-26: The new member variables
max_channels
,freq
,buffer_size
, andbitsDepth
have been added. Ensure that these are initialized correctly in the constructor and used appropriately throughout the class. Also, the copy constructor and copy assignment operator have been deleted to prevent shallow copying of the object, which is a good practice for classes managing resources.45-60: The
reset
function now has two new overloads, one accepting auint8_t
and another accepting amixer::eChannelGroup
. TheisActive
function has also been overloaded to accept amixer::eChannelGroup
. Ensure that these new overloads are used correctly throughout the codebase.75-85: The
getChannelGroupVolume
,setChannelGroupVolume
,getChannelGroupPan
,setChannelGroupPan
functions have been added. Also, a new member variablem_reverseStereo
has been added with a corresponding functiontoggleReverseStereo
. Ensure that these new functions and the variable are used correctly throughout the codebase.87-97: The
updateChannelsVolumePan_
function has been added. Also, them_group_settings
array has been added. Ensure that these new additions are used correctly throughout the codebase.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/mixer/Channel.cpp (1)
- 17-20: The initialization of
m_converter
now usesm_mixer.freq
instead ofm_mixer.getOutputRate()
. Ensure thatm_mixer.freq
is always correctly set before this function is called.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.cpp (8)
86-98: The
reset
function has been overloaded to reset channels based on a group. This could be useful for managing groups of channels together.130-133: The
isChannelActive
function has been renamed toisActive
and now checks if a specific channel is active. This change should be reflected in all calls to this function.144-152: A new
isActive
function has been added to check if any channel is active. This could be useful for managing the state of the mixer as a whole.155-164: The
isActive
function has been overloaded to check if any channel in a specific group is active. This could be useful for managing groups of channels together.231-235: The
updateChannelsVolumePan_
function has been added to update the volume and pan of all channels. This could be useful for managing the volume and pan of all channels together.237-239: The
init_
function has been modified to usefreq
andbuffer_size
parameters. This change should be reflected in all calls to this function.246-254: The
desired
audio specs have been updated to usefreq
andbuffer_size
parameters. This could affect the audio output quality.286-288: The
callback
function has been modified to use a scoped lock. This could improve thread safety.
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/woody/WoodyOPL.cpp
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/scummvm/mame/MameOPL2.cpp
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/opl/mame/MameOPL3.cpp
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/PCMDriver.cpp
Outdated
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/IHardware.cpp
Outdated
Show resolved
Hide resolved
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/drivers/PCMDriver.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/sonarcloud.yml (1 hunks)
Additional comments: 3
.github/workflows/sonarcloud.yml (3)
18-19: The
branches
key underpush
is commented out. This means that the workflow will run on push events to all branches. If you want to limit this to specific branches, uncomment and specify the branches.21-29: The
pull_request
event is now active, and the workflow will run on pull requests. However, it will ignore changes to the paths specified underpaths-ignore
. Ensure that this is the intended behavior.31-31: The
permissions
key is commented out. This means that the workflow will have the default permissions. If you want to limit the permissions, uncomment and specify the permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (6)
- sdl2-hyper-sonic-drivers/examples/pcm-example.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp (1 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp (2 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp (1 hunks)
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/hardware/TestPCSpeaker.cpp (1 hunks)
Files skipped from review due to trivial changes (3)
- sdl2-hyper-sonic-drivers/examples/pcm-example.cpp
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/WAVFile.cpp
- sdl2-hyper-sonic-drivers/test/HyperSonicDrivers/hardware/TestPCSpeaker.cpp
Additional comments: 5
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.cpp (1)
- 30-36: The change from
m_sampleRate
tom_freq
in theaudio::PCMSound
constructor call is noted. Ensure that this change is reflected everywherem_sampleRate
was previously used, and that the newm_freq
variable is correctly initialized and used.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/VOCFile.cpp (2)
74-79: The calculation of
m_freq
has been updated and the old calculation form_sampleRate
has been commented out. Ensure that this new calculation is correct and that it doesn't introduce any bugs in the system. Also, the assertion on line 79 should be updated or removed if it's no longer relevant.137-143: The calculation of
m_freq
,m_bitsDepth
, andm_channels
has been updated. Ensure that these changes are correct and that they don't introduce any bugs in the system.sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/files/IPCMFile.hpp (2)
20-21: The function
getSampleRate
now returnsm_freq
. Ensure that this change is reflected wherever this function is called, and that the semantics ofm_freq
match those of the originalm_sampleRate
.29-29: The member variable
m_sampleRate
has been renamed tom_freq
. Ensure that this change is reflected wherever this variable is accessed or modified.
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (2)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.cpp (7 hunks)
- sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/hardware/IHardware.cpp (1 hunks)
Additional comments: 7
sdl2-hyper-sonic-drivers/src/HyperSonicDrivers/audio/sdl2/Mixer.cpp (7)
1-5: The inclusion of
<ranges>
is new. Ensure that the project's minimum supported compiler version supports C++20, which introduced this header.87-99: The new
reset
overload for channel groups is a good addition for better control over channel groups. However, ensure that thegetChannelGroup
function is thread-safe or consider making itconst
if it doesn't modify any class members.131-134: The renaming of
isChannelActive
toisActive
is a breaking change. Ensure that all calls to this function throughout the codebase have been updated to match the new name.145-151: The new
isActive
overload without parameters is a good addition for checking if any channel is active. However, ensure that theisEnded
function is thread-safe or consider making itconst
if it doesn't modify any class members.153-161: The new
isActive
overload for channel groups is a good addition for better control over channel groups. However, ensure that thegetChannelGroup
andisEnded
functions are thread-safe or consider making themconst
if they don't modify any class members.242-251: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [234-251]
The
init_
function now acceptsfreq
andbuffer_size
parameters. Ensure that all calls to this function throughout the codebase have been updated to match the new signature.
- 283-285: The
callback
function now locksm_mutex
at the start. This is a good practice to prevent data races, but ensure that no functions called within this function also try to lockm_mutex
, as this could lead to a deadlock if the mutex is not recursive.
Summary by CodeRabbit
IMixer
class and related classes.reset
function, and new functionsisActive
andupdateChannelsVolumePan_
.output_channel
function calls.m_volL
andm_volR
.m_buf
buffer.