@@ -117,8 +117,8 @@ class GOSoundOrganEngine : public GOSoundOrganInterface {
117117 * @param pSampler current playing sampler for switching to a new attack
118118 */
119119 void SwitchToAnotherAttack (GOSoundSampler *pSampler);
120- float GetRandomFactor ();
121- unsigned GetBufferSizeFor (unsigned outputIndex, unsigned n_frames);
120+ float GetRandomFactor () const ;
121+ unsigned GetBufferSizeFor (unsigned outputIndex, unsigned n_frames) const ;
122122
123123public:
124124 GOSoundOrganEngine ();
@@ -132,18 +132,22 @@ class GOSoundOrganEngine : public GOSoundOrganInterface {
132132 void SetAudioOutput (std::vector<GOAudioOutputConfiguration> audio_outputs);
133133 void SetupReverb (GOConfig &settings);
134134 void SetVolume (int volume);
135- void SetSampleRate (unsigned sample_rate);
136- void SetSamplesPerBuffer (unsigned sample_per_buffer);
137- void SetInterpolationType (unsigned type);
135+ void SetSampleRate (unsigned sample_rate) { m_SampleRate = sample_rate; }
136+ void SetSamplesPerBuffer (unsigned sample_per_buffer) {
137+ m_SamplesPerBuffer = sample_per_buffer;
138+ }
139+ void SetInterpolationType (unsigned type) {
140+ m_interpolation = (GOSoundResample::InterpolationType)type;
141+ }
138142 unsigned GetSampleRate () const override { return m_SampleRate; }
139143 void SetAudioGroupCount (unsigned groups);
140- unsigned GetAudioGroupCount ();
144+ unsigned GetAudioGroupCount () const { return m_AudioGroupCount; }
141145 void SetHardPolyphony (unsigned polyphony);
142- void SetPolyphonyLimiting (bool limiting);
143- unsigned GetHardPolyphony () const ;
144- int GetVolume () const ;
145- void SetScaledReleases (bool enable);
146- void SetRandomizeSpeaking (bool enable);
146+ void SetPolyphonyLimiting (bool limiting) { m_PolyphonyLimiting = limiting; }
147+ unsigned GetHardPolyphony () const { return m_SamplerPool. GetUsageLimit (); }
148+ int GetVolume () const { return m_Volume; }
149+ void SetScaledReleases (bool enable) { m_ScaledReleases = enable; }
150+ void SetRandomizeSpeaking (bool enable) { m_RandomizeSpeaking = enable; }
147151 const std::vector<double > &GetMeterInfo ();
148152 void SetAudioRecorder (GOSoundRecorder *recorder, bool downmix);
149153
@@ -187,14 +191,14 @@ class GOSoundOrganEngine : public GOSoundOrganInterface {
187191 void GetAudioOutput (
188192 unsigned outputIndex, bool isLast, GOSoundBufferMutable &outBuffer);
189193 void NextPeriod ();
190- GOSoundScheduler &GetScheduler ();
194+ GOSoundScheduler &GetScheduler () { return m_Scheduler; }
191195
192196 bool ProcessSampler (
193197 float *buffer, GOSoundSampler *sampler, unsigned n_frames, float volume);
194198 void ProcessRelease (GOSoundSampler *sampler);
195199 void PassSampler (GOSoundSampler *sampler);
196200 void ReturnSampler (GOSoundSampler *sampler);
197- float GetGain ();
201+ float GetGain () const { return m_Gain; }
198202 uint64_t GetTime () const { return m_CurrentTime; }
199203};
200204
0 commit comments