On Monday 09 May 2005 19:02, Paul Davis wrote:
> if you allow arbitrary zoom scales, then the mapping between pixel
> position on screen (or some notional "unit" position as offered by
> canvas widgets) and a sample is non-integral, which implies
> rounding. that in turn implies errors of several different kinds.
>
> moreover, if you are displaying large audio files, reading the audio
> data itself is excrutiatingly slow. hence, peakfiles.
And here's another one in Qt, from Rivendell's Marker Editor:
http://www.salemradiolabs.com/rivendell/
Unpack the tarball and look in rdlibrary/edit_audio.cpp.
Paul is quite right about all the round-off and peak-file issues. Rivendell
handles that by assuming that the smallest atom of audio is always 1152
samples long -- which just happens to be the standard MPEG sample block size.
This gives acceptable precision for the marker editor, but would probably not
be adequate in a general purpose editor. Even the 'simplified' version is
quite headache-inducing enough, however... :)
Cheers!
|-------------------------------------------------------------------------|
| Frederick F. Gleason, Jr. | Director of Broadcast Software Development |
| | Salem Radio Labs |
|-------------------------------------------------------------------------|
| Never worry about theory as long as the machinery does what it's |
| supposed to do. |
| -- Robert A. Heinlein |
|-------------------------------------------------------------------------|
Received on Tue May 10 04:15:16 2005
This archive was generated by hypermail 2.1.8 : Tue May 10 2005 - 04:15:16 EEST