24 #include "sound/MASoundBase.hpp" 25 #include "sound/MASpeakerDevice.hpp" 26 #include "MAController.hpp" 28 #include <MCThreadLocalData.hpp> 30 #include <boost/shared_ptr.hpp> 31 #include <boost/tuple/tuple.hpp> 32 #include <boost/unordered_map.hpp> 51 typedef boost::tuple<int, int, int64_t, int> PlaybackDescriptor;
53 typedef std::multimap<MA::SoundBaseSPtr, PlaybackDescriptor> SoundPlaybackMap;
66 virtual void UpdateRobotState(
MARobotState& state)
override;
69 virtual MA::DeviceList GetMotors()
const override;
82 static void RegisterFutureSound(
const int id,
const std::string& name,
const int duration);
98 void SwitchSoundProfile();
107 std::string GetSoundProfileName()
const;
116 void SetSoundProfileName(
const std::string& profile_name);
123 virtual void LoadSoundProfile();
130 virtual void SaveSoundProfile();
137 virtual void LoadVolumeControl();
144 virtual void SaveVolumeControl();
155 bool Preload(
const std::string& name);
164 void FreePreloadedSound(
const std::string& name);
175 int Play(
const std::string& name);
186 int Play(MA::SoundBaseSPtr sound);
197 bool IsPlayed(
const int playback_id)
const;
208 bool IsPlayed(
const std::string& sound_name)
const;
217 void SetVolume(
const MA::VolumeType new_volume);
219 void MixNextBuffer(int16_t* target_buffer,
bool limit_non_cached =
true);
220 unsigned int GetRemainingPlaybackTime()
const;
221 bool IsOnlyEffectsPlayed()
const;
222 virtual MA::DeviceGeneratorsMap GetSkitTransitionGenerators(MA::SkitBaseSPtr skit)
override;
boost::shared_ptr< MASpeakerDevice > SpeakerDevice
Speaker device.
Base class for the controllers.
Speaker controller class.
MA::SoundPlaybackMap Playbacks
Actual playback list of the sound files.
A wrapper class to cover boost::thread_specific_ptr/folly::ThreadLocal API on certain targets...
int BufferSize
Determinates the buffer duration for the playback.