22class MSXCommandController;
48 std::unique_ptr<StringSetting>
record;
49 std::unique_ptr<BooleanSetting>
mute;
73 int balance,
unsigned numChannels);
139 [[nodiscard]]
const SoundDeviceInfo*
findDeviceInfo(std::string_view name)
const;
145 void updateVolumeParams(SoundDeviceInfo& info)
const;
146 void updateMasterVolume();
149 void generate(std::span<StereoFloat> output, EmuTime::param time);
152 void executeUntil(EmuTime::param time)
override;
157 void update(
const SpeedManager& speedManager)
noexcept override;
165 unsigned fragmentSize;
166 unsigned hostSampleRate;
169 std::vector<SoundDeviceInfo> infos;
181 struct SoundDeviceInfoTopic final :
InfoTopic {
182 explicit SoundDeviceInfoTopic(
InfoCommand& machineInfoCommand);
183 void execute(std::span<const TclObject> tokens,
185 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
186 void tabCompletion(std::vector<std::string>& tokens)
const override;
189 AviRecorder* recorder =
nullptr;
190 unsigned synchronousCounter = 0;
Represents a clock with a variable frequency.
This class contains settings that are used by several other class (including some singletons).
A Setting with an integer value.
const DynamicClock & getHostSampleClock() const
Clock that ticks at the exact moment(s) in time that a host sample should be generated.
void mute()
TODO This methods (un)mute the sound.
const SoundDeviceInfo * findDeviceInfo(std::string_view name) const
void setRecorder(AviRecorder *recorder)
void registerSound(SoundDevice &device, float volume, int balance, unsigned numChannels)
Use this method to register a given SoundDevice.
void setSynchronousMode(bool synchronous)
If we're recording, we want to emulate sound at 100% EmuTime speed.
MSXMixer(const MSXMixer &)=delete
void updateSoftwareVolume(SoundDevice &device)
Used by SoundDevice::setSoftwareVolume()
MSXMixer & operator=(const MSXMixer &)=delete
unsigned getSampleRate() const
double getEffectiveSpeed() const
Returns the ratio of EmuTime-speed per realtime-speed.
const auto & getDeviceInfos() const
SoundDevice * findDevice(std::string_view name) const
bool needStereoRecording() const
void updateStream(EmuTime::param time)
Use this method to force an 'early' call to all updateBuffer() methods.
static constexpr int AMP_BITS
bool isSynchronousMode() const
void setMixerParams(unsigned fragmentSize, unsigned sampleRate)
Set new fragment size and sample frequency.
void unregisterSound(SoundDevice &device)
Every SoundDevice must unregister before it is destructed.
Generic Gang-of-Four Observer class, templatized edition.
Every class that wants to get scheduled at some point must inherit from this class.
Manages the desired ratio between EmuTime and real time.
Manages the throttle state of openMSX.
This file implemented 3 utility functions:
std::unique_ptr< StringSetting > record
std::unique_ptr< BooleanSetting > mute
dynarray< ChannelSettings > channelSettings
std::unique_ptr< IntegerSetting > balanceSetting
std::unique_ptr< IntegerSetting > volumeSetting