Revision 0abdb293 libavformat/aiffenc.c
libavformat/aiffenc.c | ||
---|---|---|
21 | 21 |
|
22 | 22 |
#include "avformat.h" |
23 | 23 |
#include "aiff.h" |
24 |
#include "avio_internal.h" |
|
24 | 25 |
|
25 | 26 |
typedef struct { |
26 | 27 |
int64_t form; |
... | ... | |
43 | 44 |
aifc = 1; |
44 | 45 |
|
45 | 46 |
/* FORM AIFF header */ |
46 |
put_tag(pb, "FORM");
|
|
47 |
ffio_wfourcc(pb, "FORM");
|
|
47 | 48 |
aiff->form = url_ftell(pb); |
48 | 49 |
avio_wb32(pb, 0); /* file length */ |
49 |
put_tag(pb, aifc ? "AIFC" : "AIFF");
|
|
50 |
ffio_wfourcc(pb, aifc ? "AIFC" : "AIFF");
|
|
50 | 51 |
|
51 | 52 |
if (aifc) { // compressed audio |
52 | 53 |
enc->bits_per_coded_sample = 16; |
... | ... | |
55 | 56 |
return -1; |
56 | 57 |
} |
57 | 58 |
/* Version chunk */ |
58 |
put_tag(pb, "FVER");
|
|
59 |
ffio_wfourcc(pb, "FVER");
|
|
59 | 60 |
avio_wb32(pb, 4); |
60 | 61 |
avio_wb32(pb, 0xA2805140); |
61 | 62 |
} |
62 | 63 |
|
63 | 64 |
/* Common chunk */ |
64 |
put_tag(pb, "COMM");
|
|
65 |
ffio_wfourcc(pb, "COMM");
|
|
65 | 66 |
avio_wb32(pb, aifc ? 24 : 18); /* size */ |
66 | 67 |
avio_wb16(pb, enc->channels); /* Number of channels */ |
67 | 68 |
|
... | ... | |
88 | 89 |
} |
89 | 90 |
|
90 | 91 |
/* Sound data chunk */ |
91 |
put_tag(pb, "SSND");
|
|
92 |
ffio_wfourcc(pb, "SSND");
|
|
92 | 93 |
aiff->ssnd = url_ftell(pb); /* Sound chunk size */ |
93 | 94 |
avio_wb32(pb, 0); /* Sound samples data size */ |
94 | 95 |
avio_wb32(pb, 0); /* Data offset */ |
Also available in: Unified diff