Song pipeline state

From Buzztard

Jump to: navigation, search

In buzz one can connect e.g. the soundcard input to some machines and would immediately hear what happens. Likewise one can activate a machine and play notes and hear the sound.

Idea

After loading a song, we set the pipeline to play. It will loop a small range. When the user presses play, we interrupt the loop and start to play from the play-cursor. The small live-loop need to be located in time, either before or after the song. I suggest G_MAXUINT64-GST_SECOND ... G_MAXUINT64-1.

We need a method to start and end this looping (like e.g. bt_song_idle_start() and _stop()). One would then do:

song=bt_song_new(BT_APPLICATION(self));
bt_song_io_load(loader,song);
bt_song_idle_start(song);

When the user presses the play button:

bt_song_idle_stop(song);
bt_song_play(song);

When the user presses stop or pause, or EOS occured:

bt_song_stop(song);
bt_song_idle_start(song);

When destroying the song:

if(self->priv->is_playing) bt_song_stop(song);
else bt_song_idle_stop(song);

The bt_song_idle_start() methods would be something like bt_song_play() but using a different seek.

Notes

bt-cmd does generally not want this :). Thus maybe the app should activate/deactivate the idle mode. This can be done by having an interactive flag in the song. If TRUE song would use the idle loop.

Support Us

Collaboration

SourceForge Logo
GStreamer Logo
Become a Friend of GNOME
Linux Sound Logo
MediaWiki
Valgrind
GNU Library Public Licence
GNU Free Documentation License 1.2