In an audio player, various options such as Play, Pause, Stop, and so on, provide a way to control the streaming audio. Such playback controls also find use in other audio processing techniques. We have already used some of the playback controls in Chapter 5, Working with Audios. In this chapter, we will study some more controlling options.
In the previous chapter, we developed a preliminary command-line audio player using GStreamer. The audio streaming can be started by instructing the GStreamer pipeline to begin the flow of audio data. This was achieved by the following code:
self.pipeline.set_state(gst.STATE_PLAYING)
With the above instruction, the audio will be streamed until the end of the stream is reached. Refer to the code in the Playing Audio section of Chapter 5, Working with Audios to see what the surrounding code looks like. If you develop a user interface for a simple audio player, the "Play" button can be connected to a method that will set the state of...