Skip to content

Fix #10 by implementing fbd_dev_sound_stop

Changes made:

  • moved fbd_dev_sound_stop from fbd-feedback-sound.c to fbd-dev-sound.c

  • in struct FbdDevSound new member GCancellable *playback

  • in initable_init allocating the cancellable with g_cancellable_new

  • in fbd_dev_sound_dispose disposing of the cancellable with g_clear_object

  • in fbd_dev_sound_stop cancelling the cancellable with g_cancellable_cancel but also drop the cancellable and create a new one

The recreation of the cancellable is necessary b/c the FdbDevSound object may be reused. If it is reused, the sound is immediately cancelled when started with the old cancellable.

There is the possibility to reset the cancellable but the documentation of g_cancellable_reset advises to remove the reference and create a new object.

Edited by Martin Bürgmann

Merge request reports