audio: Remove on_pause_count_changed callback
The UI should handle this directly on end-of-stream messages. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
50147ef070
commit
acac350879
|
@ -3,7 +3,6 @@
|
|||
* Copyright 2013 (c) Anna Schumaker.
|
||||
*/
|
||||
#include <core/audio.h>
|
||||
#include <core/callback.h>
|
||||
#include <core/deck.h>
|
||||
#include <core/driver.h>
|
||||
|
||||
|
@ -80,7 +79,6 @@ static bool continue_playback()
|
|||
_pause_enabled = false;
|
||||
} else
|
||||
_pause_count--;
|
||||
get_callbacks()->on_pause_count_changed(_pause_enabled, _pause_count);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -181,7 +179,6 @@ void audio :: pause_after(bool enabled, unsigned int n)
|
|||
|
||||
_pause_enabled = enabled;
|
||||
_pause_count = n;
|
||||
get_callbacks()->on_pause_count_changed(enabled, n);
|
||||
}
|
||||
|
||||
bool audio :: pause_enabled()
|
||||
|
|
|
@ -5,14 +5,11 @@
|
|||
#include <core/callback.h>
|
||||
|
||||
|
||||
static void no_op(bool, unsigned int) {}
|
||||
static void no_op(Queue *, unsigned int) {}
|
||||
static void no_op(Queue *) {}
|
||||
|
||||
|
||||
static struct Callbacks callbacks = {
|
||||
.on_pause_count_changed = no_op,
|
||||
|
||||
.on_pq_removed = no_op,
|
||||
|
||||
.on_queue_track_add = no_op,
|
||||
|
|
|
@ -13,17 +13,6 @@
|
|||
* A structure for managing callback function pointers
|
||||
*/
|
||||
struct Callbacks {
|
||||
/* Audio callbacks */
|
||||
|
||||
/**
|
||||
* Called when the audio layer's pause count changes.
|
||||
*
|
||||
* @param enabled The current status of automatic pausing.
|
||||
* @param n The number of tracks before pausing.
|
||||
*/
|
||||
void (*on_pause_count_changed)(bool, unsigned int);
|
||||
|
||||
|
||||
/* Deck callbacks */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue