InputQTAudio

Module that reads audio from a QuickTime file. This module only works in 32bit mode and requires that USE_QUICKTIME_OLD is defined in the IKAROS_System.h file.

Example XML definition

Example

  <module
      class = "InputQTAudio"
      name = "InputQTAudio"
      filename = "movie.mov"
  />

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "InputQTAudio".string
nameThe name of this instance of the module.string
filenameFile to read the data fromstring
samples_per_bufferIf this integer valued attribute is not present, then the module defaults to reading the audio in a manner synchronized with a track of visual frames that is also assumed to be present in the Quicktime file. Buffers of audio data are returned corresponding to the visual frames that would successively be obtained from the Quicktime file. If this attribute is present, then it should provide a positive integer number of samples to be provided on each tick by this module. In this case, no synchronization with a visual track is provided and hence no visual track is required in the file indicated by the filename. In this case, when using the samples_per_buffer attribute, the last buffer returned by this module may not have the requested size.int
iterationsNumber of times to iterate the filesint1
extendNumber of additional time steps to run before the module sends the end-of-file signal to the IKAROS kernel. This attribute is used to allow the data in the input file to propagate through the network of modules before the execution is terminated.int0

Module Connections

Outputs

NameDescription
CHANNELSThe data output by this module is a block with m rows and n columns. Each row corresponds to a sample (frame) of audio. Each column corresponds to a channel of audio obtained from the input file.
NUMBER_SAMPLESThis output will contain a single float number on each tick-- the number of rows that have values assigned in the CHANNELS output.

Limitations

OS X only.

Bugs

May not close all files in certain cases.

I have been unable to get a match with the number of samples I read from the file with other Quicktime programs when I use the samples_per_buffer attribute in my module. My code generates a different number of samples from the program http://developer.apple.com/samplecode/QTAudioExtractionPanel/QTAudioExtractionPanel.html, which also generates a different number of samples from Quicktime Pro 7.0.1. In my file example "JanetWerker-5-17-05.mov", I get the following results in the number of audio samples: Program: Number of samples My audio module, with the samples_per_buffer attribute: 1930571 QTAudioExtractionPanel: 1930570 Quicktime Pro 7.0.1 used to determine the number of samples in the original Quicktime movie: 1931882 Quicktime Pro 7.0.1, used to extract the audio track into an AIFF file and then determine the number of audio samples in that AIFF file. 1930556 However, the contents of the samples (except for the last one, which was extra, and was zero valued) that I extracted in my module were the same as in the QTAudioExtractionPanel.

Author

Chistopher G. Prince

Files

InputQTAudio.h
InputQTAudio.cc
QuickTimeAudioUtils.h
QuickTimeAudioUtils.cc
MTAudioBufferListUtils.h
MTAudioBufferListUtils.cc
InputQTAudio.ikc

blog comments powered by Disqus