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

Simplify audio example #18

Merged
merged 10 commits into from Nov 15, 2015

Conversation

Projects
None yet
2 participants
@Squareys
Contributor

Squareys commented Nov 8, 2015

Hi @mosra !

I rember you once suggesting the audio example could be something more simple as in using the shape renderer similar to the bullet example. So I boiled it down, but there are the one or the other thing I believe I need to improve.

Current Controls:

  • Right/Left: Rotate source around Y
  • Up/Down: Rotate source around Local X
  • PageUp/PageDown: Move source away/towards listener (/camera)

TODOs:

  • Use DualQuaternions to avoid "Matrix has non uniform scaling" assertion failure
  • Separate Camera from listener to visualize listener (for keeping the source on screen)
  • Screenshot
  • Readme

Greetings,
Squareys

@Squareys Squareys force-pushed the Squareys:simplify-audio-example branch 3 times, most recently from 6ff4500 to 7400418 Nov 14, 2015

@Squareys

This comment has been minimized.

Contributor

Squareys commented Nov 15, 2015

I am pretty happy how this turned out. The focus is now much more on the audio than rendering 2D textures, which makes this soo much easier to understand.

@mosra I declare this as "ready for merge from my side"! :)

@Squareys Squareys changed the title from [WIP] Simplify audio example to Simplify audio example Nov 15, 2015

namespace Magnum {namespace Examples {
typedef Scene<DualQuaternionTransformation> SceneDQ;
typedef Object<DualQuaternionTransformation> ObjectDQ;
typedef Object<DualQuaternionTransformation> ObjectDQ;

This comment has been minimized.

@mosra

mosra Nov 15, 2015

Owner

I would maybe leave the original Scene3D/Object3D names. Wondered for a while what the DQ actually means :) Also, the second typedef seems to be duplicated.

_drawables(),
_playables(),
_playable(_sourceObject, &_playables),
_listener(_scene)

This comment has been minimized.

@mosra

mosra Nov 15, 2015

Owner

No need to call the default constructors explicitly, I think. There are no naked pointers that would break stuff later.

_sourceRig.normalizeRotation();
} else if(event.key() == KeyEvent::Key::PageUp)
_sourceObject.translate({0.0f, 0.0f, -.25f});
else if(event.key() == KeyEvent::Key::PageDown && _sourceObject.transformation().translation().z() != 0.0f)

This comment has been minimized.

@mosra

mosra Nov 15, 2015

Owner

Comparing floats this way might not work in all cases (floating point drift strikes again). Would > instead of != work?

This comment has been minimized.

@Squareys

Squareys Nov 15, 2015

Contributor

Yes, totally :)

#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}"
#else
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"

This comment has been minimized.

@mosra

mosra Nov 15, 2015

Owner

You are very thorough, that's great :)

This comment has been minimized.

@Squareys

Squareys Nov 15, 2015

Contributor

I try, at least :P I usually miss stuff anyways.

Squareys added some commits Nov 8, 2015

audio: Simplify AudioExample.
The previous example showed not just how to play audio with Magnum, but
also how to render 2D textures in a 2D scene graph which completely bloated
the code and distracted from the main goal: how to play audio.

Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Remove obsolete resources.
Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Remove obsolete TexturedDrawable.
Signed-off-by: Squareys <Squareys@googlemail.com>
package/ci: Build MagnumDebugTools also on AppVeyor.
Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Remove unused MAGNUM_PLUGINS_IMPORTER_DIR define.
No textures are imported anymore.

Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Remove obsolete Types.h.
The ObjectDQ and SceneDQ types are now defined in AudioExample.cpp, since
it is the only file using them.

Signed-off-by: Squareys <Squareys@googlemail.com>
package/ci: Update openal-soft download link.
The old download link has been removed and a new version of openal-soft
was released.

Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Update screenshot.
Signed-off-by: Squareys <Squareys@googlemail.com>
audio: Update README.md.
Signed-off-by: Squareys <Squareys@googlemail.com>

@Squareys Squareys force-pushed the Squareys:simplify-audio-example branch from 7400418 to c120028 Nov 15, 2015

audio: Remove MagnumPrimitives from target_link_libraries.
It is not used anymore.

Signed-off-by: Squareys <Squareys@googlemail.com>
@Squareys

This comment has been minimized.

Contributor

Squareys commented Nov 15, 2015

@mosra The issues you pointed out have been taken care of.

@mosra mosra merged commit 373e5c7 into mosra:master Nov 15, 2015

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@Squareys

This comment has been minimized.

Contributor

Squareys commented Nov 15, 2015

Thanks! :)

@mosra

This comment has been minimized.

Owner

mosra commented Nov 15, 2015

Merged! Simple and clean, very nice :)

@mosra mosra added this to the 2018.02 milestone Feb 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment