Skip to content

Commit

Permalink
Fix sound about to finish notification bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qcapen committed Jul 20, 2019
1 parent f974c7c commit 3b4df51
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mpfmc/core/audio/notification_message.pxd
Expand Up @@ -113,7 +113,7 @@ cdef inline void send_sound_looping_notification(int player, Uint64 sound_id, Ui

track.notification_messages = g_slist_prepend(track.notification_messages, notification_message)

cdef inline void send_sound_about_to_finish_notification(int player, long sound_id, long sound_instance_id,
cdef inline void send_sound_about_to_finish_notification(int player, Uint64 sound_id, Uint64 sound_instance_id,
TrackState *track) nogil:
"""
Sends a sound about to finish notification
Expand Down
1 change: 0 additions & 1 deletion mpfmc/core/audio/track_standard.pyx
Expand Up @@ -2,7 +2,6 @@
#cython: embedsignature=True, language_level=3

from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free
cimport cpython.pycapsule as pycapsule
import cython
import logging
import time
Expand Down
3 changes: 3 additions & 0 deletions mpfmc/tests/machine_files/audio/config/test_audio.yaml
Expand Up @@ -73,6 +73,9 @@ sounds:
- time: 3.5sec
name: verse_1
events: moron_next_marker, last_marker
- time: 5.39sec
name: about_to_finish
events: moron_about_to_finish_marker
210871_synthping:
priority: 1
simultaneous_limit: 3
Expand Down
2 changes: 2 additions & 0 deletions mpfmc/tests/test_Audio.py
Expand Up @@ -210,6 +210,8 @@ def test_typical_sound_system(self):
self.mc.bcp_processor.send.assert_any_call('trigger', sound_instance=ANY, marker_id=0, name='moron_marker')
self.mc.bcp_processor.send.assert_any_call('trigger', sound_instance=ANY, marker_id=1, name='moron_next_marker')
self.mc.bcp_processor.send.assert_any_call('trigger', sound_instance=ANY, marker_id=1, name='last_marker')
self.mc.bcp_processor.send.assert_any_call('trigger', sound_instance=ANY, marker_id=2,
name='moron_about_to_finish_marker')

def test_sound_instance_parameters(self):
"""Test the creation of sound instances and their parameters"""
Expand Down

0 comments on commit 3b4df51

Please sign in to comment.