summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-27 23:20:12 -0500
committerXANTRONIX Development2022-02-27 23:20:12 -0500
commit79d6c75a1324073488a2e34db36ce0afb203537c (patch)
treeb93a05532a2f26cb29df48baf93b8eb4aa125436 /examples
parent445050f6ad1603bbd778f29be7b5503c2a455873 (diff)
downloadxas-79d6c75a1324073488a2e34db36ce0afb203537c.tar.gz
xas-79d6c75a1324073488a2e34db36ce0afb203537c.tar.bz2
xas-79d6c75a1324073488a2e34db36ce0afb203537c.zip
Implement xas_object
Changes: * Implement xas_object as a base "class" for all playback state objects; allow implementation of start() and stop() methods to control playback * Move code for setting gain, bank slot to a new method, xas_bank_player_select() * Remove code from xas_bank_player_start() setting gain, bank slot * Add xas_object header to each monaural playable object
Diffstat (limited to 'examples')
-rw-r--r--examples/say.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/say.c b/examples/say.c
index fa16242..c89a245 100644
--- a/examples/say.c
+++ b/examples/say.c
@@ -154,12 +154,14 @@ int main(int argc, char **argv) {
goto error_bank_record;
}
+ xas_bank_player_select(player, 0, 1.0);
+
for (i=0; i<duration_frames; i++) {
void *buf;
ssize_t readlen;
if (i >= 300 && !xas_bank_player_playing(player)) {
- xas_bank_player_start(player, 0, 1.0);
+ xas_bank_player_start(player);
}
if ((readlen = xas_audio_stream_read(mixer->output,