Reader small image

You're reading from  Tkinter GUI Application Development Blueprints

Product typeBook
Published inNov 2015
Reading LevelExpert
PublisherPackt
ISBN-139781785889738
Edition1st Edition
Languages
Right arrow
Author (1)
Bhaskar Chaudhary
Bhaskar Chaudhary
author image
Bhaskar Chaudhary

Bhaskar Chaudhary is a professional programmer and information architect. He has a decade of experience in consulting, contracting, and educating in the field of software development. He has worked with a large set of programming languages on various platforms over the years. He is an electronics hobbyist and a musician in his free time.
Read more about Bhaskar Chaudhary

Right arrow

One-time updates during audio playback


The audio program must update some information as soon as an audio track starts playing. Broadly speaking, there are two kinds of updates that the program needs to monitor and update:

  • One-time updates: Examples of this include the name of the track and the total length of the track.

  • Continuous updates: Examples of this include the position of the seek bar knob and the elapsed play duration. We also need to continuously check whether a track has ended to either play the next track, play the current track again, or stop playing, depending on the loop choice made by the user.

These two kinds of updates will affect sections of the audio player, as shown in the following screenshot:

Let's start with the one-time updates, as they are relatively simple to implement. Since these updates must occur when the playback starts, let's define a method named manage_one_time_updates() and call it from within the start_play() method of the View class, as follows (see code...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Tkinter GUI Application Development Blueprints
Published in: Nov 2015Publisher: PacktISBN-13: 9781785889738

Author (1)

author image
Bhaskar Chaudhary

Bhaskar Chaudhary is a professional programmer and information architect. He has a decade of experience in consulting, contracting, and educating in the field of software development. He has worked with a large set of programming languages on various platforms over the years. He is an electronics hobbyist and a musician in his free time.
Read more about Bhaskar Chaudhary