Get AeonWave up to par again by removing a number of errors, and fixing a unit type for the audio cone inner and outer angle.
This commit is contained in:
parent
1a4568175c
commit
ece2f913a1
@ -257,7 +257,7 @@ void SGSoundMgr::stop()
|
|||||||
|
|
||||||
if (is_working()) {
|
if (is_working()) {
|
||||||
_active = false;
|
_active = false;
|
||||||
TRY( d->_aax.set(AAX_STOPPED) );
|
TRY( d->_aax.set(AAX_PROCESSED) );
|
||||||
|
|
||||||
_renderer = "unknown";
|
_renderer = "unknown";
|
||||||
_vendor = "unknown";
|
_vendor = "unknown";
|
||||||
@ -411,11 +411,8 @@ void SGSoundMgr::release_source( unsigned int source )
|
|||||||
if ( source_it != d->_sources.end() )
|
if ( source_it != d->_sources.end() )
|
||||||
{
|
{
|
||||||
aax::Emitter& emitter = source_it->second;
|
aax::Emitter& emitter = source_it->second;
|
||||||
enum aaxState state = emitter.state();
|
|
||||||
if (state != AAX_PROCESSED) {
|
|
||||||
TRY( emitter.set(AAX_PROCESSED) );
|
TRY( emitter.set(AAX_PROCESSED) );
|
||||||
TRY( d->_aax.remove(emitter) );
|
TRY( d->_aax.remove(emitter) );
|
||||||
}
|
|
||||||
TRY( emitter.remove_buffer() );
|
TRY( emitter.remove_buffer() );
|
||||||
d->_sources.erase(source_it);
|
d->_sources.erase(source_it);
|
||||||
}
|
}
|
||||||
@ -621,7 +618,7 @@ bool SGSoundMgr::is_sample_stopped(SGSoundSample *sample)
|
|||||||
assert(sample->is_valid_source());
|
assert(sample->is_valid_source());
|
||||||
aax::Emitter& emitter = d->get_emitter(sample->get_source());
|
aax::Emitter& emitter = d->get_emitter(sample->get_source());
|
||||||
int result = emitter.state();
|
int result = emitter.state();
|
||||||
return (result == AAX_STOPPED);
|
return (result == AAX_PROCESSED);
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
@ -651,9 +648,9 @@ void SGSoundMgr::update_sample_config( SGSoundSample *sample, SGVec3d& position,
|
|||||||
TRY( emitter.set(dsp) );
|
TRY( emitter.set(dsp) );
|
||||||
|
|
||||||
if ( sample->has_static_data_changed() ) {
|
if ( sample->has_static_data_changed() ) {
|
||||||
dsp = emitter.get(AAX_ANGULAR_FILTER);
|
dsp = emitter.get(AAX_DIRECTIONAL_FILTER);
|
||||||
TRY( dsp.set(AAX_INNER_ANGLE, sample->get_innerangle()) );
|
TRY( dsp.set(AAX_INNER_ANGLE, sample->get_innerangle(), AAX_DEGREES) );
|
||||||
TRY( dsp.set(AAX_OUTER_ANGLE, sample->get_outerangle()) );
|
TRY( dsp.set(AAX_OUTER_ANGLE, sample->get_outerangle(), AAX_DEGREES) );
|
||||||
TRY( dsp.set(AAX_OUTER_GAIN, sample->get_outergain()) );
|
TRY( dsp.set(AAX_OUTER_GAIN, sample->get_outergain()) );
|
||||||
TRY( emitter.set(dsp) );
|
TRY( emitter.set(dsp) );
|
||||||
|
|
||||||
|
@ -29,6 +29,10 @@ int main( int argc, char *argv[] ) {
|
|||||||
smgr->set_volume(0.9);
|
smgr->set_volume(0.9);
|
||||||
smgr->activate();
|
smgr->activate();
|
||||||
|
|
||||||
|
// prevent NaNs
|
||||||
|
SGQuatd orient = SGQuatd::fromYawPitchRollDeg(0.0, 0.0, 0.0);
|
||||||
|
smgr->set_orientation( orient );
|
||||||
|
|
||||||
SGPath srcDir(SRC_DIR);
|
SGPath srcDir(SRC_DIR);
|
||||||
|
|
||||||
SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
|
SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
|
||||||
|
@ -30,6 +30,10 @@ int main( int argc, char *argv[] ) {
|
|||||||
|
|
||||||
SGPath srcDir(SRC_DIR);
|
SGPath srcDir(SRC_DIR);
|
||||||
|
|
||||||
|
// prevent NaNs
|
||||||
|
SGQuatd orient = SGQuatd::fromYawPitchRollDeg(0.0, 0.0, 0.0);
|
||||||
|
smgr->set_orientation( orient );
|
||||||
|
|
||||||
printf("default position and orientation\n");
|
printf("default position and orientation\n");
|
||||||
SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
|
SGSoundSample *sample1 = new SGSoundSample("jet.wav", srcDir);
|
||||||
sample1->set_volume(1.0);
|
sample1->set_volume(1.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user