-
Notifications
You must be signed in to change notification settings - Fork 1
Sound Manager to master #22
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
base: master
Are you sure you want to change the base?
Conversation
…in ums as pointer to object not string). Work in progress with soundGroup
…, observer pattern in SoundGroup
…o audio to clip, fix bugs
src/sound/manager.cpp
Outdated
void SoundManager::removeClip(std::shared_ptr<SoundClip> sc) { | ||
removeFromVector(v_clips, sc); | ||
if (sc) { | ||
sc->~SoundClip(); |
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.
how about no
src/sound/manager.cpp
Outdated
void SoundManager::removeClip(std::shared_ptr<SoundClip> sc) { | ||
removeFromVector(v_clips, sc); | ||
if (sc) { | ||
sc->~SoundClip(); |
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.
NO
src/sound/manager.cpp
Outdated
} | ||
|
||
void SoundManager::removeGroup(std::weak_ptr<SoundGroup> sc) { | ||
sc.lock()->~SoundGroup(); |
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.
NOOOO
src/sound/source.cpp
Outdated
|
||
void SoundSourceObject::initSource(int number_of_sources){ | ||
alGetError(); | ||
this->number_of_sources = number_of_sources; |
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.
if there are no plans to use this "number of sounds" please remove it
src/sound/source.cpp
Outdated
// SoundSourceObject constructor to create object with only one sound source | ||
|
||
SoundSourceObject::SoundSourceObject(){ | ||
SoundSourceObject::initSource(1); |
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.
also, i guess, just inline the initSource()
function in here
src/sound/source.cpp
Outdated
} | ||
|
||
void SoundSourceObject::stop(int source_number) { | ||
if (source_number > this->number_of_sources || !alIsSource(this->sso_sources[source_number])) { |
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.
eeee, make is so that SSOs are always valid
No description provided.