1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

Fix Bug 183: Zero crossing detection previously could/would select samples that were in the spaces between audio. This led to selection of audio before time zero. It also led to poor behaviour where clips did not end at zero. Now spaces between audio are strongly discouraged (treated as samples of value 2.0) for zero detection.

This commit is contained in:
james.k.crook@gmail.com
2012-03-25 16:19:08 +00:00
parent b7406f91e3
commit 2f0323c8fd
5 changed files with 34 additions and 5 deletions

View File

@@ -24,6 +24,12 @@ typedef enum {
floatSample = 0x0004000F
} sampleFormat;
// Used to determine how to fill in empty areas of audio.
typedef enum {
fillZero = 0,
fillTwo = 2
}fillFormat;
/** \brief Return the size (in memory) of one sample (bytes) */
#define SAMPLE_SIZE(SampleFormat) (SampleFormat >> 16)
/** \brief Return the size on disk of one uncompressed sample (bytes) */