X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fsound.hh;h=1f7fcfe788c1e33d5fd44975f4d26e8d98cf8400;hp=a3c94f1009bbe698bf7cd9d5fa716a8ac9d5a92c;hb=574af38ed616d1adfa5e6ce35f67cda1f707f89d;hpb=1da520638918096276158ecdfaeebc14a3d70be7 diff --git a/src/moof/sound.hh b/src/moof/sound.hh index a3c94f1..1f7fcfe 100644 --- a/src/moof/sound.hh +++ b/src/moof/sound.hh @@ -1,20 +1,18 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * -* vi:ts=4 sw=4 tw=75 -* * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * -**************************************************************************/ +*****************************************************************************/ #ifndef _MOOF_SOUND_HH_ #define _MOOF_SOUND_HH_ /** * \file sound.hh - * Load and play sounds, current supports ogg vorbis. + * Load and play sounds, currently supports ogg vorbis. */ #include @@ -27,37 +25,39 @@ namespace moof { +// forward declarations +class script; + class sound { public: sound(); - explicit sound(const std::string& path); + explicit sound(const std::string& name); - void sample(const std::string& path); - void enqueue(const std::string& path); + void sample(const std::string& name); + void queue(const std::string& name); void play(); - void stream(); void stop(); void pause(); - void rewind(); void toggle(); bool is_playing() const; + void buffer_size(scalar seconds); + void position(const vector3& position); void velocity(const vector3& velocity); void gain(scalar gain); void pitch(scalar pitch); void loop(bool looping); + static void listener_position(const vector3& position); + static void listener_velocity(const vector3& velocity); + static void listener_orientation(const vector3& forward, const vector3& up); - void listener_position(const vector3& position); - void listener_velocity(const vector3& velocity); - void listener_orientation(const vector3& forward, - const vector3& up); - + static void import(script& script, const std::string& nspace = ""); private: