History

--guard, & associated changes

robs committed 17 years ago

Commit 1f70a301 parent bd403cd74 files · +628 −719Browse files

Showing the changes to src/example2.c (1 of 74 files). Show all

Unified · Split

src/example2.c+2−3
@@ -82,15 +82,14 @@ int main(int argc, char * argv[]) · 81 unmodified lines
82 /* Read in and process blocks of audio for the selected period or until EOF: */82 /* Read in and process blocks of audio for the selected period or until EOF: */
83 for (blocks = 0; sox_read(in, buf, block_size) == block_size && blocks * block_period < period; ++blocks) {83 for (blocks = 0; sox_read(in, buf, block_size) == block_size && blocks * block_period < period; ++blocks) {
84 double left = 0, right = 0;84 double left = 0, right = 0;
85 size_t i, clips = 0;85 size_t i;
86 static const char line[] = "===================================";86 static const char line[] = "===================================";
87 int l, r;87 int l, r;
88 88
89 for (i = 0; i < block_size; ++i) {89 for (i = 0; i < block_size; ++i) {
90 SOX_SAMPLE_LOCALS;
91 /* convert the sample from SoX's internal format to a `double' for90 /* convert the sample from SoX's internal format to a `double' for
92 * processing in this application: */91 * processing in this application: */
93 double sample = SOX_SAMPLE_TO_FLOAT_64BIT(buf[i], clips);92 double sample = SOX_SAMPLE_TO_FLOAT_64BIT(buf[i]);
94 93
95 /* The samples for each channel are interleaved; in this example94 /* The samples for each channel are interleaved; in this example
96 * we allow only stereo audio, so the left channel audio can be found in95 * we allow only stereo audio, so the left channel audio can be found in

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t