summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-07-04 10:55:44 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-07-04 10:55:44 -0700
commit8f33f32bc9be2f497f73e40c521e1b97c8da3d27 (patch)
tree94da1dcd59ce04d470bade332e009e470a053893
parent082c62b7fd7b51dfcebc34a7e60747bf684de670 (diff)
downloadsound-8f33f32bc9be2f497f73e40c521e1b97c8da3d27.tar.gz
sound-8f33f32bc9be2f497f73e40c521e1b97c8da3d27.tar.bz2
Split move sound effect into left, right, up, and down.
-rw-r--r--soundeffects/soundeffects.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/soundeffects/soundeffects.c b/soundeffects/soundeffects.c
index 1e7b21f..52c33be 100644
--- a/soundeffects/soundeffects.c
+++ b/soundeffects/soundeffects.c
@@ -56,7 +56,20 @@ static void soundeffectsWindowMoveNotify( CompWindow *w, int dx, int dy,
SOUND_SCREEN( w->screen );
SOUND_DISPLAY( w->screen->display );
- (*sd->soundPlayFile) ( w->screen->display, "move.ogg" );
+ if ( !immediate && abs( dx ) >= abs( dy ) )
+ {
+ if ( dx > 0 )
+ (*sd->soundPlayFile) ( w->screen->display, "moveright.ogg" );
+ else
+ (*sd->soundPlayFile) ( w->screen->display, "moveleft.ogg" );
+ }
+ else
+ {
+ if ( dy > 0 )
+ (*sd->soundPlayFile) ( w->screen->display, "movedown.ogg" );
+ else
+ (*sd->soundPlayFile) ( w->screen->display, "moveup.ogg" );
+ }
UNWRAP( ss, w->screen, windowMoveNotify );
(*w->screen->windowMoveNotify) ( w, dx, dy, immediate );