aifc.getmark(id)
is a function in the Python module. A function is a block of code that executes only when called. You can pass data, called parameters, to a function. A function can return corresponding data. Modules are files made up of Python code. Modules can define functions.
Some functions in the aifc module provide support for reading and writing AIFF (Audio Interchange File Format) and AIFC files. AIFC is a newer version of AIFF that can compress audio data.
The followings are ways to use the aifc module in Python.
The number of channels: indicates if the audio is mono, stereo, or Quadro.
The sampling rate or frame rate: the number of times the sound is sampled per second.
The frame includes one sample per channel.
Sample size: the size of each sample (in bytes).
The following explains mono, stereo, and Quadro audio.
ifc.getmark(id)
.The word get
is a function that helps one have access to the event. id
uniquely identifies an event.
The word mark
is related to markers. We use markers to show an important event in a video or audio file, so that in the future one can easily have access to the event.
This marker consists of a set of three elements.
This function returns such a tuple for the given id.
#importing the aifc module
import aifc
#using the open function in the aifc module to open the Django.aifc file.
#assigning to the variable 'object'
object = aifc.open('Django.aifc','rb')
#printing out the output
print( object.getmark(1))
## output
(1, 0,b'beg s loop')