summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/libflac/doc/html/api/group__flac__stream__encoder.html
blob: 9160f3974ba0fc77c2a1488e41c82a86887163cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FLAC: FLAC/stream_encoder.h: stream encoder interface</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>FLAC/stream_encoder.h: stream encoder interface<br>
<small>
[<a class="el" href="group__flac__encoder.html">FLAC/_encoder.h: encoder interfaces</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
This module contains the functions which implement the stream encoder. 
<p>
The stream encoder can encode to native FLAC, and optionally Ogg FLAC (check FLAC_API_SUPPORTS_OGG_FLAC) streams and files.<p>
The basic usage of this encoder is as follows:<ul>
<li>The program creates an instance of an encoder using <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a>.</li><li>The program overrides the default settings using FLAC__stream_encoder_set_*() functions. At a minimum, the following functions should be called:<ul>
<li><a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga14">FLAC__stream_encoder_set_ogg_serial_number()</a> (if encoding to Ogg FLAC)</li><li><a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a> (if known)</li></ul>
</li><li>If the application wants to control the compression level or set its own metadata, then the following should also be called:<ul>
<li><a class="el" href="group__flac__stream__encoder.html#ga20">FLAC__stream_encoder_set_compression_level()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata()</a></li></ul>
</li><li>The rest of the set functions should only be called if the client needs exact control over how the audio is compressed; thorough understanding of the FLAC format is necessary to achieve good results.</li><li>The program initializes the instance to validate the settings and prepare for encoding using<ul>
<li><a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> or <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a> for native FLAC</li><li><a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> or <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file()</a> for Ogg FLAC</li></ul>
</li><li>The program calls <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a> to encode data, which subsequently calls the callbacks when there is encoder data ready to be written.</li><li>The program finishes the encoding with <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, which causes the encoder to encode any data still in its input pipe, update the metadata with the final encoding statistics if output seeking is possible, and finally reset the encoder to the uninitialized state.</li><li>The instance may be used again or deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a>.</li></ul>
<p>
In more detail, the stream encoder functions similarly to the <a class="el" href="group__flac__stream__decoder.html">stream decoder </a>, but has fewer callbacks and more options. Typically the client will create a new instance by calling <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a>, then set the necessary parameters with FLAC__stream_encoder_set_*(), and initialize it by calling one of the FLAC__stream_encoder_init_*() functions.<p>
Unlike the decoders, the stream encoder has many options that can affect the speed and compression ratio. When setting these parameters you should have some basic knowledge of the format (see the <a href="../documentation.html#format">user-level documentation</a> or the <a href="../format.html">formal description</a>). The FLAC__stream_encoder_set_*() functions themselves do not validate the values as many are interdependent. The FLAC__stream_encoder_init_*() functions will do this, so make sure to pay attention to the state returned by FLAC__stream_encoder_init_*() to make sure that it is FLAC__STREAM_ENCODER_INIT_STATUS_OK. Any parameters that are not set before FLAC__stream_encoder_init_*() will take on the defaults from the constructor.<p>
There are three initialization functions for native FLAC, one for setting up the encoder to encode FLAC data to the client via callbacks, and two for encoding directly to a file.<p>
For encoding via callbacks, use <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a>. You must also supply a write callback which will be called anytime there is raw encoded data to write. If the client can seek the output it is best to also supply seek and tell callbacks, as this allows the encoder to go back after encoding is finished to write back information that was collected while encoding, like seek point offsets, frame sizes, etc.<p>
For encoding directly to a file, use <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> or <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a>. Then you must only supply a filename or open <code>FILE*</code>; the encoder will handle all the callbacks internally. You may also supply a progress callback for periodic notification of the encoding progress.<p>
There are three similarly-named init functions for encoding to Ogg FLAC streams. Check <code>FLAC_API_SUPPORTS_OGG_FLAC</code> to find out if the library has been built with Ogg support.<p>
The call to FLAC__stream_encoder_init_*() currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block. Note that for Ogg FLAC encoding you will usually get at least twice the number of callbacks than with native FLAC, one for the Ogg page header and one for the page body.<p>
After initializing the instance, the client may feed audio data to the encoder in one of two ways:<p>
<ul>
<li>Channel separate, through <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> - The client will pass an array of pointers to buffers, one for each channel, to the encoder, each of the same length. The samples need not be block-aligned, but each channel should have the same number of samples.</li><li>Channel interleaved, through <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a> - The client will pass a single pointer to data that is channel-interleaved (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). Again, the samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be channel0_sample0 and the last value channelN_sampleM.</li></ul>
<p>
Note that for either process call, each sample in the buffers should be a signed integer, right-justified to the resolution set by <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].<p>
When the client is finished encoding data, it calls <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, which causes the encoder to encode any data still in its input pipe, and call the metadata callback with the final encoding statistics. Then the instance may be deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a> or initialized again to encode another stream.<p>
For programs that write their own metadata, but that do not know the actual metadata until after encoding, it is advantageous to instruct the encoder to write a PADDING block of the correct size, so that instead of rewriting the whole stream after encoding, the program can just overwrite the PADDING block. If only the maximum size of the metadata is known, the program can write a slightly larger padding block, then split it after encoding.<p>
Make sure you understand how lengths are calculated. All FLAC metadata blocks have a 4 byte header which contains the type and length. This length does not include the 4 bytes of the header. See the format page for the specification of metadata blocks and their lengths.<p>
<dl compact><dt><b>Note:</b></dt><dd>If you are writing the FLAC data to a file via callbacks, make sure it is open for update (e.g. mode "w+" for stdio streams). This is because after the first encoding pass, the encoder will try to seek back to the beginning of the stream, to the STREAMINFO block, to write some data there. (If using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE(), the file is managed internally.)<p>
The "set" functions may only be called when the encoder is in the state FLAC__STREAM_ENCODER_UNINITIALIZED, i.e. after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> or <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>, but before FLAC__stream_encoder_init_*(). If this is the case they will return <code>true</code>, otherwise <code>false</code>.<p>
<a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> resets all settings to the constructor defaults. </dd></dl>

<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a></td></tr>

<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> )(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data)</td></tr>

<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> { <br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga65a12">FLAC__STREAM_ENCODER_OK</a> =  0, 
<a class="el" href="group__flac__stream__encoder.html#gga65a13">FLAC__STREAM_ENCODER_UNINITIALIZED</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga65a14">FLAC__STREAM_ENCODER_OGG_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga65a15">FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga65a16">FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga65a17">FLAC__STREAM_ENCODER_CLIENT_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga65a18">FLAC__STREAM_ENCODER_IO_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga65a19">FLAC__STREAM_ENCODER_FRAMING_ERROR</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga65a20">FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</a>
<br>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> { <br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga66a21">FLAC__STREAM_ENCODER_INIT_STATUS_OK</a> =  0, 
<a class="el" href="group__flac__stream__encoder.html#gga66a22">FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a23">FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a24">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga66a25">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a26">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a27">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a28">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga66a29">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a30">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a31">FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a32">FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__stream__encoder.html#gga66a33">FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga66a34">FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED</a>
<br>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga67a35">FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga67a36">FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga67a38">FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga68a39">FLAC__STREAM_ENCODER_WRITE_STATUS_OK</a> =  0, 
<a class="el" href="group__flac__stream__encoder.html#gga68a40">FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga69a41">FLAC__STREAM_ENCODER_SEEK_STATUS_OK</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga69a42">FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga69a43">FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</a>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a> { <a class="el" href="group__flac__stream__encoder.html#gga70a44">FLAC__STREAM_ENCODER_TELL_STATUS_OK</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga70a45">FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</a>, 
<a class="el" href="group__flac__stream__encoder.html#gga70a46">FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</a>
 }</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga14">FLAC__stream_encoder_set_ogg_serial_number</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, long serial_number)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga16">FLAC__stream_encoder_set_streamable_subset</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga20">FLAC__stream_encoder_set_compression_level</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga21">FLAC__stream_encoder_set_blocksize</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga24">FLAC__stream_encoder_set_apodization</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *specification)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__bool value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, unsigned value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 value)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **metadata, unsigned num_blocks)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga36">FLAC__stream_encoder_get_verify_decoder_state</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga37">FLAC__stream_encoder_get_resolved_state_string</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga38">FLAC__stream_encoder_get_verify_decoder_error_stats</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_sample, unsigned *frame_number, unsigned *channel, unsigned *sample, FLAC__int32 *expected, FLAC__int32 *got)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga39">FLAC__stream_encoder_get_verify</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga40">FLAC__stream_encoder_get_streamable_subset</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga41">FLAC__stream_encoder_get_channels</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga42">FLAC__stream_encoder_get_bits_per_sample</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga43">FLAC__stream_encoder_get_sample_rate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga44">FLAC__stream_encoder_get_blocksize</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga45">FLAC__stream_encoder_get_do_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga46">FLAC__stream_encoder_get_loose_mid_side_stereo</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga47">FLAC__stream_encoder_get_max_lpc_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga48">FLAC__stream_encoder_get_qlp_coeff_precision</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga49">FLAC__stream_encoder_get_do_qlp_coeff_prec_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga50">FLAC__stream_encoder_get_do_escape_coding</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga51">FLAC__stream_encoder_get_do_exhaustive_model_search</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga52">FLAC__stream_encoder_get_min_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga53">FLAC__stream_encoder_get_max_residual_partition_order</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga54">FLAC__stream_encoder_get_rice_parameter_search_dist</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__uint64&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga55">FLAC__stream_encoder_get_total_samples_estimate</a> (const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> metadata_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, <a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a> read_callback, <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a> write_callback, <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a> seek_callback, <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a> tell_callback, <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a> metadata_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FILE *file, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FILE *file, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *filename, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const char *filename, <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a> progress_callback, void *client_data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 *const buffer[], unsigned samples)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved</a> (<a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__int32 buffer[], unsigned samples)</td></tr>

<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga0">FLAC__StreamEncoderStateString</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga1">FLAC__StreamEncoderInitStatusString</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga2">FLAC__StreamEncoderReadStatusString</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga3">FLAC__StreamEncoderWriteStatusString</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga4">FLAC__StreamEncoderSeekStatusString</a> []</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__stream__encoder.html#ga5">FLAC__StreamEncoderTellStatusString</a> []</td></tr>

</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga6" doxytag="stream_encoder.h::FLAC__StreamEncoderReadCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the read callback.<p>
A function pointer matching this signature must be passed to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> if seeking is supported. The supplied function will be called when the encoder needs to read back encoded data. This happens during the metadata callback, when the encoder has to read, modify, and rewrite the metadata (e.g. seekpoints) gathered while encoding. The address of the buffer to be filled is supplied, along with the number of bytes the buffer can hold. The callback may choose to supply less data and modify the byte count but must be careful not to overflow the buffer. The callback then returns a status code chosen from FLAC__StreamEncoderReadStatus.<p>
Here is an example of a read callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a> read_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__byte buffer[], size_t *bytes, <span class="keywordtype">void</span> *client_data)
 {
   FILE *file = ((MyClientData*)client_data)-&gt;file;
   <span class="keywordflow">if</span>(*bytes &gt; 0) {
     *bytes = fread(buffer, <span class="keyword">sizeof</span>(FLAC__byte), *bytes, file);
     <span class="keywordflow">if</span>(ferror(file))
       <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>;
     <span class="keywordflow">else</span> <span class="keywordflow">if</span>(*bytes == 0)
       <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a36">FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</a>;
     <span class="keywordflow">else</span>
       <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a35">FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</a>;
   }
   <span class="keywordflow">else</span>
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga67a37">FLAC__STREAM_ENCODER_READ_STATUS_ABORT</a>;
 }
</pre></div><p>
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>A pointer to a location for the callee to store data to be encoded. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>A pointer to the size of the buffer. On entry to the callback, it contains the maximum number of bytes that may be stored in <em>buffer</em>. The callee must set it to the actual number of bytes stored (0 in case of error or end-of-stream) before returning. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_set_client_data(). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderReadStatus</em>&nbsp;</td><td>The callee's return status. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga7" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the write callback.<p>
A function pointer matching this signature must be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called by the encoder anytime there is raw encoded data ready to write. It may include metadata mixed with encoded audio frames and the data is not guaranteed to be aligned on frame or metadata block boundaries.<p>
The only duty of the callback is to write out the <em>bytes</em> worth of data in <em>buffer</em> to the current position in the output stream. The arguments <em>samples</em> and <em>current_frame</em> are purely informational. If <em>samples</em> is greater than <code>0</code>, then <em>current_frame</em> will hold the current frame number that is being written; otherwise it indicates that the write callback is being called to write metadata.<p>
<dl compact><dt><b>Note:</b></dt><dd>Unlike when writing to native FLAC, when writing to Ogg FLAC the write callback will be called twice when writing each audio frame; once for the page header, and once for the page body. When writing the page header, the <em>samples</em> argument to the write callback will be <code>0</code>.<p>
In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>An array of encoded data of length <em>bytes</em>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>The byte length of <em>buffer</em>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>samples</em>&nbsp;</td><td>The number of samples encoded by <em>buffer</em>. <code>0</code> has a special meaning; see above. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>current_frame</em>&nbsp;</td><td>The number of the current frame being encoded. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderWriteStatus</em>&nbsp;</td><td>The callee's return status. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="stream_encoder.h::FLAC__StreamEncoderSeekCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the seek callback.<p>
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called when the encoder needs to seek the output stream. The encoder will pass the absolute byte offset to seek to, 0 meaning the beginning of the stream.<p>
Here is an example of a seek callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a> seek_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
 {
   FILE *file = ((MyClientData*)client_data)-&gt;file;
   <span class="keywordflow">if</span>(file == stdin)
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a43">FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</a>;
   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) &lt; 0)
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a42">FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</a>;
   <span class="keywordflow">else</span>
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga69a41">FLAC__STREAM_ENCODER_SEEK_STATUS_OK</a>;
 }
</pre></div><p>
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em>&nbsp;</td><td>The offset from the beginning of the stream to seek to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderSeekStatus</em>&nbsp;</td><td>The callee's return status. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga9" doxytag="stream_encoder.h::FLAC__StreamEncoderTellCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a>(* <a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the tell callback.<p>
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called when the encoder needs to know the current position of the output stream.<p>
<dl compact><dt><b>Warning:</b></dt><dd>The callback must return the true current byte offset of the output to which the encoder is writing. If you are buffering the output, make sure and take this into account. If you are writing directly to a FILE* from your write callback, ftell() is sufficient. If you are writing directly to a file descriptor from your write callback, you can use lseek(fd, SEEK_CUR, 0). The encoder may later seek back to these points to rewrite metadata after encoding.</dd></dl>
Here is an example of a tell callback for stdio streams: <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a> tell_cb(<span class="keyword">const</span> <a class="code" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 *absolute_byte_offset, <span class="keywordtype">void</span> *client_data)
 {
   FILE *file = ((MyClientData*)client_data)-&gt;file;
   off_t pos;
   <span class="keywordflow">if</span>(file == stdin)
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a46">FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</a>;
   <span class="keywordflow">else</span> <span class="keywordflow">if</span>((pos = ftello(file)) &lt; 0)
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a45">FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</a>;
   <span class="keywordflow">else</span> {
     *absolute_byte_offset = (FLAC__uint64)pos;
     <span class="keywordflow">return</span> <a class="code" href="group__flac__stream__encoder.html#gga70a44">FLAC__STREAM_ENCODER_TELL_STATUS_OK</a>;
   }
 }
</pre></div><p>
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>absolute_byte_offset</em>&nbsp;</td><td>The address at which to store the current position of the output. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderTellStatus</em>&nbsp;</td><td>The callee's return status. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga10" doxytag="stream_encoder.h::FLAC__StreamEncoderMetadataCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, const <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *metadata, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the metadata callback.<p>
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_stream(). The supplied function will be called once at the end of encoding with the populated STREAMINFO structure. This is so the client can seek back to the beginning of the file and write the STREAMINFO block with the correct statistics after encoding (like minimum/maximum frame size and total samples).<p>
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>metadata</em>&nbsp;</td><td>The final populated STREAMINFO block. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga11" doxytag="stream_encoder.h::FLAC__StreamEncoderProgressCallback"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef void(* <a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>)(const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Signature for the progress callback.<p>
A function pointer matching this signature may be passed to FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE(). The supplied function will be called when the encoder has finished writing a frame. The <code>total_frames_estimate</code> argument to the callback will be based on the value from <a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a>.<p>
<dl compact><dt><b>Note:</b></dt><dd>In general, <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> functions which change the state should not be called on the <em>encoder</em> while in the callback.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>The encoder instance calling the callback. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bytes_written</em>&nbsp;</td><td>Bytes written so far. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>samples_written</em>&nbsp;</td><td>Samples written so far. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>frames_written</em>&nbsp;</td><td>Frames written so far. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>total_frames_estimate</em>&nbsp;</td><td>The estimate of the total number of frames to be written. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>The callee's client data set through FLAC__stream_encoder_init_*(). </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="ga65" doxytag="stream_encoder.h::FLAC__StreamEncoderState"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
State values for a <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>.<p>
The encoder's state can be obtained by calling <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a>.<p>
If the encoder gets into any other state besides <code>FLAC__STREAM_ENCODER_OK</code> or <code>FLAC__STREAM_ENCODER_UNINITIALIZED</code>, it becomes invalid for encoding and must be deleted with <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a>. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga65a12" doxytag="FLAC__STREAM_ENCODER_OK"></a>FLAC__STREAM_ENCODER_OK</em>&nbsp;</td><td>
The encoder is in the normal OK state and samples can be processed. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a13" doxytag="FLAC__STREAM_ENCODER_UNINITIALIZED"></a>FLAC__STREAM_ENCODER_UNINITIALIZED</em>&nbsp;</td><td>
The encoder is in the uninitialized state; one of the FLAC__stream_encoder_init_*() functions must be called before samples can be processed. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a14" doxytag="FLAC__STREAM_ENCODER_OGG_ERROR"></a>FLAC__STREAM_ENCODER_OGG_ERROR</em>&nbsp;</td><td>
An error occurred in the underlying Ogg layer. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a15" doxytag="FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR"></a>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</em>&nbsp;</td><td>
An error occurred in the underlying verify stream decoder; check <a class="el" href="group__flac__stream__encoder.html#ga36">FLAC__stream_encoder_get_verify_decoder_state()</a>. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a16" doxytag="FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"></a>FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA</em>&nbsp;</td><td>
The verify decoder detected a mismatch between the original audio signal and the decoded audio signal. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a17" doxytag="FLAC__STREAM_ENCODER_CLIENT_ERROR"></a>FLAC__STREAM_ENCODER_CLIENT_ERROR</em>&nbsp;</td><td>
One of the callbacks returned a fatal error. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a18" doxytag="FLAC__STREAM_ENCODER_IO_ERROR"></a>FLAC__STREAM_ENCODER_IO_ERROR</em>&nbsp;</td><td>
An I/O error occurred while opening/reading/writing a file. Check <code>errno</code>. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a19" doxytag="FLAC__STREAM_ENCODER_FRAMING_ERROR"></a>FLAC__STREAM_ENCODER_FRAMING_ERROR</em>&nbsp;</td><td>
An error occurred while writing the stream; usually, the write_callback returned an error. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga65a20" doxytag="FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR"></a>FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR</em>&nbsp;</td><td>
Memory allocation failed. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga66" doxytag="stream_encoder.h::FLAC__StreamEncoderInitStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Possible return values for the FLAC__stream_encoder_init_*() functions. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga66a21" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_OK"></a>FLAC__STREAM_ENCODER_INIT_STATUS_OK</em>&nbsp;</td><td>
Initialization was successful. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a22" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR"></a>FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR</em>&nbsp;</td><td>
General failure to set up encoder; call <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> for cause. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a23" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER</em>&nbsp;</td><td>
The library was not compiled with support for the given container format. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a24" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS</em>&nbsp;</td><td>
A required callback was not supplied. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a25" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS</em>&nbsp;</td><td>
The encoder has an invalid setting for number of channels. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a26" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE</em>&nbsp;</td><td>
The encoder has an invalid setting for bits-per-sample. FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a27" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE</em>&nbsp;</td><td>
The encoder has an invalid setting for the input sample rate. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a28" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE</em>&nbsp;</td><td>
The encoder has an invalid setting for the block size. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a29" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER</em>&nbsp;</td><td>
The encoder has an invalid setting for the maximum LPC order. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a30" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION</em>&nbsp;</td><td>
The encoder has an invalid setting for the precision of the quantized linear predictor coefficients. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a31" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER"></a>FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER</em>&nbsp;</td><td>
The specified block size is less than the maximum LPC order. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a32" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE"></a>FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE</em>&nbsp;</td><td>
The encoder is bound to the <a href="../format.html#subset">Subset</a> but other settings violate it. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a33" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA"></a>FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA</em>&nbsp;</td><td>
The metadata input to the encoder is invalid, in one of the following ways:<ul>
<li><a class="el" href="group__flac__stream__encoder.html#ga34">FLAC__stream_encoder_set_metadata()</a> was called with a null pointer but a block count &gt; 0</li><li>One of the metadata blocks contains an undefined type</li><li>It contains an illegal CUESHEET as checked by <a class="el" href="group__flac__format.html#ga87">FLAC__format_cuesheet_is_legal()</a></li><li>It contains an illegal SEEKTABLE as checked by <a class="el" href="group__flac__format.html#ga85">FLAC__format_seektable_is_legal()</a></li><li>It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block </li></ul>
</td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga66a34" doxytag="FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED"></a>FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED</em>&nbsp;</td><td>
FLAC__stream_encoder_init_*() was called when the encoder was already initialized, usually because <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> was not called.</td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga67" doxytag="stream_encoder.h::FLAC__StreamEncoderReadStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga67">FLAC__StreamEncoderReadStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> read callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga67a35" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE"></a>FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE</em>&nbsp;</td><td>
The read was OK and decoding can continue. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga67a36" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM"></a>FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM</em>&nbsp;</td><td>
The read was attempted at the end of the stream. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga67a37" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_ABORT"></a>FLAC__STREAM_ENCODER_READ_STATUS_ABORT</em>&nbsp;</td><td>
An unrecoverable error occurred. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga67a38" doxytag="FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
Client does not support reading back from the output. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga68" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga68">FLAC__StreamEncoderWriteStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> write callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga68a39" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_OK"></a>FLAC__STREAM_ENCODER_WRITE_STATUS_OK</em>&nbsp;</td><td>
The write was OK and encoding can continue. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga68a40" doxytag="FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR"></a>FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR</em>&nbsp;</td><td>
An unrecoverable error occurred. The encoder will return from the process call. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga69" doxytag="stream_encoder.h::FLAC__StreamEncoderSeekStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga69">FLAC__StreamEncoderSeekStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> seek callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga69a41" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_OK"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_OK</em>&nbsp;</td><td>
The seek was OK and encoding can continue. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga69a42" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR</em>&nbsp;</td><td>
An unrecoverable error occurred. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga69a43" doxytag="FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
Client does not support seeking. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga70" doxytag="stream_encoder.h::FLAC__StreamEncoderTellStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__stream__encoder.html#ga70">FLAC__StreamEncoderTellStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return values for the <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> tell callback. <dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga70a44" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_OK"></a>FLAC__STREAM_ENCODER_TELL_STATUS_OK</em>&nbsp;</td><td>
The tell was OK and encoding can continue. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga70a45" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_ERROR"></a>FLAC__STREAM_ENCODER_TELL_STATUS_ERROR</em>&nbsp;</td><td>
An unrecoverable error occurred. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga70a46" doxytag="FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED"></a>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</em>&nbsp;</td><td>
Client does not support seeking. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga12" doxytag="stream_encoder.h::FLAC__stream_encoder_new"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a>* FLAC__stream_encoder_new           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new stream encoder instance. The instance is created with default settings; see the individual FLAC__stream_encoder_set_*() functions for each setting's default.<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoder*</em>&nbsp;</td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga13" doxytag="stream_encoder.h::FLAC__stream_encoder_delete"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__stream_encoder_delete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Free an encoder instance. Deletes the object pointed to by <em>encoder</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>A pointer to an existing encoder. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga14" doxytag="stream_encoder.h::FLAC__stream_encoder_set_ogg_serial_number"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_ogg_serial_number           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap> <em>serial_number</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the serial number for the FLAC stream to use in the Ogg container.<p>
<dl compact><dt><b>Note:</b></dt><dd>This does not need to be set for native FLAC encoding.<p>
It is recommended to set a serial number explicitly as the default of '0' may collide with other streams.</dd></dl>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>serial_number</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga15" doxytag="stream_encoder.h::FLAC__stream_encoder_set_verify"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_verify           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the "verify" flag. If <code>true</code>, the encoder will verify it's own encoded output by feeding it through an internal decoder and comparing the original signal against the decoded signal. If a mismatch occurs, the process call will return <code>false</code>. Note that this will slow the encoding process by the extra time required for decoding and comparison.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Flag value (see above). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga16" doxytag="stream_encoder.h::FLAC__stream_encoder_set_streamable_subset"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_streamable_subset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the <a href="../format.html#subset">Subset</a> flag. If <code>true</code>, the encoder will comply with the Subset and will check the settings during FLAC__stream_encoder_init_*() to see if all settings comply. If <code>false</code>, the settings may take advantage of the full range that the format allows.<p>
Make sure you know what it entails before setting this to <code>false</code>.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>true</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Flag value (see above). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga17" doxytag="stream_encoder.h::FLAC__stream_encoder_set_channels"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_channels           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the number of channels to be encoded.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>2</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga18" doxytag="stream_encoder.h::FLAC__stream_encoder_set_bits_per_sample"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_bits_per_sample           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the sample resolution of the input to be encoded.<p>
<dl compact><dt><b>Warning:</b></dt><dd>Do not feed the encoder data that is wider than the value you set here or you will generate an invalid stream.</dd></dl>
<dl compact><dt><b>Default Value:</b></dt><dd><code>16</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga19" doxytag="stream_encoder.h::FLAC__stream_encoder_set_sample_rate"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_sample_rate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the sample rate (in Hz) of the input to be encoded.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>44100</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga20" doxytag="stream_encoder.h::FLAC__stream_encoder_set_compression_level"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_compression_level           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the compression level<p>
The compression level is roughly proportional to the amount of effort the encoder expends to compress the file. A higher level usually means more computation but higher compression. The default level is suitable for most applications.<p>
Currently the levels range from <code>0</code> (fastest, least compression) to <code>8</code> (slowest, most compression). A value larger than <code>8</code> will be treated as <code>8</code>.<p>
This function automatically calls the following other <code>_set_</code> functions with appropriate values, so the client does not need to unless it specifically wants to override them:<ul>
<li><a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga24">FLAC__stream_encoder_set_apodization()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a></li><li><a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist()</a></li></ul>
<p>
The actual values set for each level are: <table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>level</b></td><td></td><td>do mid-side stereo</td><td></td><td>loose mid-side stereo</td><td></td><td>apodization</td><td></td><td>max lpc order</td><td></td><td>qlp coeff precision</td><td></td><td>qlp coeff prec search</td><td></td><td>escape coding</td><td></td><td>exhaustive model search</td><td></td><td>min residual partition order</td><td></td><td>max residual partition order</td><td></td><td>rice parameter search dist</td><td></td></tr>
<tr>
<td><b>0</b></td><td></td><td>false</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>1</b></td><td></td><td>true</td><td></td><td>true</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>2</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>0</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>3</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>3</b></td><td></td><td>false</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>6</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>4</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>4</b></td><td></td><td>true</td><td></td><td>true</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>4</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>5</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>5</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>6</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>false</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>7</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>8</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>true</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
<tr>
<td><b>8</b></td><td></td><td>true</td><td></td><td>false</td><td></td><td>tukey(0.5)</td><td></td><td>12</td><td></td><td>0</td><td></td><td>false</td><td></td><td>false</td><td></td><td>true</td><td></td><td>0</td><td></td><td>6</td><td></td><td>0</td><td></td></tr>
</table>
<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>5</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga21" doxytag="stream_encoder.h::FLAC__stream_encoder_set_blocksize"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_blocksize           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the blocksize to use while encoding.<p>
The number of samples to use per frame. Use <code>0</code> to let the encoder estimate a blocksize; this is usually best.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga22" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_mid_side_stereo"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_mid_side_stereo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set to <code>true</code> to enable mid-side encoding on stereo input. The number of channels must be 2 for this to have any effect. Set to <code>false</code> to use only independent channel coding.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Flag value (see above). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga23" doxytag="stream_encoder.h::FLAC__stream_encoder_set_loose_mid_side_stereo"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_loose_mid_side_stereo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set to <code>true</code> to enable adaptive switching between mid-side and left-right encoding on stereo input. Set to <code>false</code> to use exhaustive searching. Setting this to <code>true</code> requires <a class="el" href="group__flac__stream__encoder.html#ga22">FLAC__stream_encoder_set_do_mid_side_stereo()</a> to also be set to <code>true</code> in order to have any effect.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>Flag value (see above). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga24" doxytag="stream_encoder.h::FLAC__stream_encoder_set_apodization"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_apodization           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>specification</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the apodization function(s) the encoder will use when windowing audio data for LPC analysis.<p>
The <em>specification</em> is a plain ASCII string which specifies exactly which functions to use. There may be more than one (up to 32), separated by <code>'</code>;' characters. Some functions take one or more comma-separated arguments in parentheses.<p>
The available functions are <code>bartlett</code>, <code>bartlett_hann</code>, <code>blackman</code>, <code>blackman_harris_4term_92db</code>, <code>connes</code>, <code>flattop</code>, <code>gauss(STDDEV)</code>, <code>hamming</code>, <code>hann</code>, <code>kaiser_bessel</code>, <code>nuttall</code>, <code>rectangle</code>, <code>triangle</code>, <code>tukey(P)</code>, <code>welch</code>.<p>
For <code>gauss(STDDEV)</code>, STDDEV specifies the standard deviation (0&lt;STDDEV&lt;=0.5).<p>
For <code>tukey(P)</code>, P specifies the fraction of the window that is tapered (0&lt;=P&lt;=1). P=0 corresponds to <code>rectangle</code> and P=1 corresponds to <code>hann</code>.<p>
Example specifications are <code>"blackman"</code> or <code>"hann;triangle;tukey(0.5);tukey(0.25);tukey(0.125)"</code> <p>
Any function that is specified erroneously is silently dropped. Up to 32 functions are kept, the rest are dropped. If the specification is empty the encoder defaults to <code>"tukey(0.5)"</code>.<p>
When more than one function is specified, then for every subframe the encoder will try each of them separately and choose the window that results in the smallest compressed subframe.<p>
Note that each function specified causes the encoder to occupy a floating point array in which to store the window.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>"tukey(0.5)"</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>specification</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> specification != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga25" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_lpc_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_max_lpc_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the maximum LPC order, or <code>0</code> to use only the fixed predictors.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga26" doxytag="stream_encoder.h::FLAC__stream_encoder_set_qlp_coeff_precision"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_qlp_coeff_precision           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the precision, in bits, of the quantized linear predictor coefficients, or <code>0</code> to let the encoder select it based on the blocksize.<p>
<dl compact><dt><b>Note:</b></dt><dd>In the current implementation, qlp_coeff_precision + bits_per_sample must be less than 32.</dd></dl>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga27" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_qlp_coeff_prec_search"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set to <code>false</code> to use only the specified quantized linear predictor coefficient precision, or <code>true</code> to search neighboring precision values and use the best one.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga28" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_escape_coding"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_escape_coding           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Deprecated. Setting this value has no effect.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga29" doxytag="stream_encoder.h::FLAC__stream_encoder_set_do_exhaustive_model_search"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_do_exhaustive_model_search           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set to <code>false</code> to let the encoder estimate the best model order based on the residual signal energy, or <code>true</code> to force the encoder to evaluate all order models and select the best.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>false</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga30" doxytag="stream_encoder.h::FLAC__stream_encoder_set_min_residual_partition_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the minimum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a>.<p>
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.<p>
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga31" doxytag="stream_encoder.h::FLAC__stream_encoder_set_max_residual_partition_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_max_residual_partition_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the maximum partition order to search when coding the residual. This is used in tandem with <a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a>.<p>
The partition order determines the context size in the residual. The context size will be approximately <code>blocksize / (2 ^ order)</code>.<p>
Set both min and max values to <code>0</code> to force a single context, whose Rice parameter is based on the residual signal variance. Otherwise, set a min and max order, and the encoder will search all orders, using the mean of each context for its Rice parameter, and use the best.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga32" doxytag="stream_encoder.h::FLAC__stream_encoder_set_rice_parameter_search_dist"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_rice_parameter_search_dist           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Deprecated. Setting this value has no effect.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga33" doxytag="stream_encoder.h::FLAC__stream_encoder_set_total_samples_estimate"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_total_samples_estimate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__uint64&nbsp;</td>
          <td class="mdname" nowrap> <em>value</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set an estimate of the total samples that will be encoded. This is merely an estimate and may be set to <code>0</code> if unknown. This value will be written to the STREAMINFO block before encoding, and can remove the need for the caller to rewrite the value later if the value is known before encoding.<p>
<dl compact><dt><b>Default Value:</b></dt><dd><code>0</code> </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga34" doxytag="stream_encoder.h::FLAC__stream_encoder_set_metadata"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_set_metadata           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>metadata</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>num_blocks</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the metadata blocks to be emitted to the stream before encoding. A value of <code>NULL</code>, <code>0</code> implies no metadata; otherwise, supply an array of pointers to metadata blocks. The array is non-const since the encoder may need to change the <em>is_last</em> flag inside them, and in some cases update seek point offsets. Otherwise, the encoder will not modify or free the blocks. It is up to the caller to free the metadata blocks after encoding finishes.<p>
<dl compact><dt><b>Note:</b></dt><dd>The encoder stores only copies of the pointers in the <em>metadata</em> array; the metadata blocks themselves must survive at least until after <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> returns. Do not free the blocks until then.<p>
The STREAMINFO block is always written and no STREAMINFO block may occur in the supplied array.<p>
By default the encoder does not create a SEEKTABLE. If one is supplied in the <em>metadata</em> array, but the client has specified that it does not support seeking, then the SEEKTABLE will be written verbatim. However by itself this is not very useful as the client will not know the stream offsets for the seekpoints ahead of time. In order to get a proper seektable the client must support seeking. See next note.<p>
SEEKTABLE blocks are handled specially. Since you will not know the values for the seek point stream offsets, you should pass in a SEEKTABLE 'template', that is, a SEEKTABLE object with the required sample numbers (or placeholder points), with <code>0</code> for the <em>frame_samples</em> and <em>stream_offset</em> fields for each point. If the client has specified that it supports seeking by providing a seek callback to <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> or both seek AND read callback to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> (or by using FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()), then while it is encoding the encoder will fill the stream offsets in for you and when encoding is finished, it will seek back and write the real values into the SEEKTABLE block in the stream. There are helper routines for manipulating seektable template blocks; see metadata.h: FLAC__metadata_object_seektable_template_*(). If the client does not support seeking, the SEEKTABLE will have inaccurate offsets which will slow down or remove the ability to seek in the FLAC stream.<p>
The encoder instance <b>will</b> modify the first <code>SEEKTABLE</code> block as it transforms the template to a valid seektable while encoding, but it is still up to the caller to free all metadata blocks after encoding.<p>
A VORBIS_COMMENT block may be supplied. The vendor string in it will be ignored. libFLAC will use it's own vendor string. libFLAC will not modify the passed-in VORBIS_COMMENT's vendor string, it will simply write it's own into the stream. If no VORBIS_COMMENT block is present in the <em>metadata</em> array, libFLAC will write an empty one, containing only the vendor string.<p>
The Ogg FLAC mapping requires that the VORBIS_COMMENT block be the second metadata block of the stream. The encoder already supplies the STREAMINFO block automatically. If <em>metadata</em> does not contain a VORBIS_COMMENT block, the encoder will supply that too. Otherwise, if <em>metadata</em> does contain a VORBIS_COMMENT block and it is not the first, the init function will reorder <em>metadata</em> by moving the VORBIS_COMMENT block to the front; the relative ordering of the other blocks will remain as they were.<p>
The Ogg FLAC mapping limits the number of metadata blocks per stream to <code>65535</code>. If <em>num_blocks</em> exceeds this the function will return <code>false</code>.</dd></dl>
<dl compact><dt><b>Default Value:</b></dt><dd><code>NULL</code>, 0 </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>metadata</em>&nbsp;</td><td>See above. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>num_blocks</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the encoder is already initialized, else <code>true</code>. <code>false</code> if the encoder is already initialized, or if <em>num_blocks</em> &gt; 65535 if encoding to Ogg FLAC, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga35" doxytag="stream_encoder.h::FLAC__stream_encoder_get_state"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga65">FLAC__StreamEncoderState</a> FLAC__stream_encoder_get_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current encoder state.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderState</em>&nbsp;</td><td>The current encoder state. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga36" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_state"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__decoder.html#ga50">FLAC__StreamDecoderState</a> FLAC__stream_encoder_get_verify_decoder_state           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the state of the verify stream decoder. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamDecoderState</em>&nbsp;</td><td>The verify stream decoder state. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga37" doxytag="stream_encoder.h::FLAC__stream_encoder_get_resolved_state_string"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* FLAC__stream_encoder_get_resolved_state_string           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current encoder state as a C string. This version automatically resolves <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code> by getting the verify decoder's state.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>A encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>const</em>&nbsp;</td><td>char * The encoder state as a C string. Do not modify the contents. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga38" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify_decoder_error_stats"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__stream_encoder_get_verify_decoder_error_stats           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__uint64 *&nbsp;</td>
          <td class="mdname" nowrap> <em>absolute_sample</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned *&nbsp;</td>
          <td class="mdname" nowrap> <em>frame_number</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned *&nbsp;</td>
          <td class="mdname" nowrap> <em>channel</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned *&nbsp;</td>
          <td class="mdname" nowrap> <em>sample</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__int32 *&nbsp;</td>
          <td class="mdname" nowrap> <em>expected</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__int32 *&nbsp;</td>
          <td class="mdname" nowrap> <em>got</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get relevant values about the nature of a verify decoder error. Useful when the stream encoder state is <code>FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR</code>. The arguments should be addresses in which the stats will be returned, or NULL if value is not desired.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>absolute_sample</em>&nbsp;</td><td>The absolute sample number of the mismatch. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>frame_number</em>&nbsp;</td><td>The number of the frame in which the mismatch occurred. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>channel</em>&nbsp;</td><td>The channel in which the mismatch occurred. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sample</em>&nbsp;</td><td>The number of the sample (relative to the frame) in which the mismatch occurred. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>expected</em>&nbsp;</td><td>The expected value for the sample in question. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>got</em>&nbsp;</td><td>The actual value returned by the decoder. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga39" doxytag="stream_encoder.h::FLAC__stream_encoder_get_verify"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_verify           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the "verify" flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga40" doxytag="stream_encoder.h::FLAC__stream_encoder_get_streamable_subset"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_streamable_subset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the &lt;A HREF="../format.html#subset&gt;Subset flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga16">FLAC__stream_encoder_set_streamable_subset()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga41" doxytag="stream_encoder.h::FLAC__stream_encoder_get_channels"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_channels           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the number of input channels being processed.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga17">FLAC__stream_encoder_set_channels()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga42" doxytag="stream_encoder.h::FLAC__stream_encoder_get_bits_per_sample"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_bits_per_sample           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the input sample resolution setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga43" doxytag="stream_encoder.h::FLAC__stream_encoder_get_sample_rate"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_sample_rate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the input sample rate setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga19">FLAC__stream_encoder_set_sample_rate()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga44" doxytag="stream_encoder.h::FLAC__stream_encoder_get_blocksize"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_blocksize           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the blocksize setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga21">FLAC__stream_encoder_set_blocksize()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga45" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_mid_side_stereo"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_mid_side_stereo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the "mid/side stereo coding" flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga45">FLAC__stream_encoder_get_do_mid_side_stereo()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga46" doxytag="stream_encoder.h::FLAC__stream_encoder_get_loose_mid_side_stereo"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_loose_mid_side_stereo           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the "adaptive mid/side switching" flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga23">FLAC__stream_encoder_set_loose_mid_side_stereo()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga47" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_lpc_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_max_lpc_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the maximum LPC order setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga25">FLAC__stream_encoder_set_max_lpc_order()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga48" doxytag="stream_encoder.h::FLAC__stream_encoder_get_qlp_coeff_precision"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_qlp_coeff_precision           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the quantized linear predictor coefficient precision setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga26">FLAC__stream_encoder_set_qlp_coeff_precision()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga49" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_qlp_coeff_prec_search"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_qlp_coeff_prec_search           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the qlp coefficient precision search flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga27">FLAC__stream_encoder_set_do_qlp_coeff_prec_search()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga50" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_escape_coding"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_escape_coding           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the "escape coding" flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga28">FLAC__stream_encoder_set_do_escape_coding()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga51" doxytag="stream_encoder.h::FLAC__stream_encoder_get_do_exhaustive_model_search"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_get_do_exhaustive_model_search           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the exhaustive model search flag.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga29">FLAC__stream_encoder_set_do_exhaustive_model_search()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga52" doxytag="stream_encoder.h::FLAC__stream_encoder_get_min_residual_partition_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_min_residual_partition_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the minimum residual partition order setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga30">FLAC__stream_encoder_set_min_residual_partition_order()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga53" doxytag="stream_encoder.h::FLAC__stream_encoder_get_max_residual_partition_order"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_max_residual_partition_order           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get maximum residual partition order setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga31">FLAC__stream_encoder_set_max_residual_partition_order()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga54" doxytag="stream_encoder.h::FLAC__stream_encoder_get_rice_parameter_search_dist"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">unsigned FLAC__stream_encoder_get_rice_parameter_search_dist           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the Rice parameter search distance setting.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to query. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>unsigned</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga32">FLAC__stream_encoder_set_rice_parameter_search_dist()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga55" doxytag="stream_encoder.h::FLAC__stream_encoder_get_total_samples_estimate"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__uint64 FLAC__stream_encoder_get_total_samples_estimate           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the previously set estimate of the total samples to be encoded. The encoder merely mimics back the value given to <a class="el" href="group__flac__stream__encoder.html#ga33">FLAC__stream_encoder_set_total_samples_estimate()</a> since it has no other way of knowing how many samples the client will encode.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An encoder instance to set. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__uint64</em>&nbsp;</td><td>See <a class="el" href="group__flac__stream__encoder.html#ga55">FLAC__stream_encoder_get_total_samples_estimate()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga56" doxytag="stream_encoder.h::FLAC__stream_encoder_init_stream"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_stream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>write_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>seek_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tell_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode native FLAC streams.<p>
This flavor of initialization sets up the encoder to encode to a native FLAC stream. I/O is performed via callbacks to the client. For encoding to a plain file via filename or open <code>FILE*</code>, <a class="el" href="group__flac__stream__encoder.html#ga60">FLAC__stream_encoder_init_file()</a> and <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a> provide a simpler interface.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
The call to <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> currently will also immediately call the write callback several times, once with the <code>fLaC</code> signature, and once for each encoded metadata block.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>write_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>seek_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. The encoder uses seeking to go back and write some some stream statistics to the STREAMINFO block; this is recommended but not necessary to create a valid FLAC stream. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tell_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderTellCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is <code>NULL</code> then this argument will be ignored. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>metadata_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. If the client provides a seek callback, this function is not necessary as the encoder will automatically seek back and update the STREAMINFO block. It may also be <code>NULL</code> if the client does not support seeking, since it will have no way of going back to update the STREAMINFO. However the client can still supply a callback if it would like to know the details from the STREAMINFO. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga57" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_stream"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_stream           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga6">FLAC__StreamEncoderReadCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>read_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga7">FLAC__StreamEncoderWriteCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>write_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga8">FLAC__StreamEncoderSeekCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>seek_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga9">FLAC__StreamEncoderTellCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>tell_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga10">FLAC__StreamEncoderMetadataCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>metadata_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode Ogg FLAC streams.<p>
This flavor of initialization sets up the encoder to encode to a FLAC stream in an Ogg container. I/O is performed via callbacks to the client. For encoding to a plain file via filename or open <code>FILE*</code>, <a class="el" href="group__flac__stream__encoder.html#ga61">FLAC__stream_encoder_init_ogg_file()</a> and <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a> provide a simpler interface.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
The call to <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> currently will also immediately call the write callback several times to write the metadata packets.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>read_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderReadCallback. This pointer must not be <code>NULL</code> if <em>seek_callback</em> is non-NULL since they are both needed to be able to write data back to the Ogg FLAC stream in the post-encode phase. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>write_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderWriteCallback. This pointer must not be <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>seek_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderSeekCallback. This pointer may be <code>NULL</code> if seeking is not supported. The encoder uses seeking to go back and write some some stream statistics to the STREAMINFO block; this is recommended but not necessary to create a valid FLAC stream. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy seek callback that just returns <code>FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tell_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderTellCallback. This pointer may be <code>NULL</code> if seeking is not supported. If <em>seek_callback</em> is <code>NULL</code> then this argument will be ignored. If <em>seek_callback</em> is not <code>NULL</code> then a <em>tell_callback</em> must also be supplied. Alternatively, a dummy tell callback that just returns <code>FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED</code> may also be supplied, all though this is slightly less efficient for the encoder. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>metadata_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderMetadataCallback. This pointer may be <code>NULL</code> if the callback is not desired. If the client provides a seek callback, this function is not necessary as the encoder will automatically seek back and update the STREAMINFO block. It may also be <code>NULL</code> if the client does not support seeking, since it will have no way of going back to update the STREAMINFO. However the client can still supply a callback if it would like to know the details from the STREAMINFO. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga58" doxytag="stream_encoder.h::FLAC__stream_encoder_init_FILE"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_FILE           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FILE *&nbsp;</td>
          <td class="mdname" nowrap> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>progress_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode native FLAC files.<p>
This flavor of initialization sets up the encoder to encode to a plain native FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> and provide callbacks for the I/O.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>An open file. The file should have been opened with mode <code>"w+b"</code> and rewound. The file becomes owned by the encoder and should not be manipulated by the client while encoding. Unless <em>file</em> is <code>stdout</code>, it will be closed when <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> is called. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>progress_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga59" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_FILE"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_FILE           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FILE *&nbsp;</td>
          <td class="mdname" nowrap> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>progress_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode Ogg FLAC files.<p>
This flavor of initialization sets up the encoder to encode to a plain Ogg FLAC file. For non-stdio streams, you must use <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>An open file. The file should have been opened with mode <code>"w+b"</code> and rewound. The file becomes owned by the encoder and should not be manipulated by the client while encoding. Unless <em>file</em> is <code>stdout</code>, it will be closed when <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a> is called. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>progress_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> file != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga60" doxytag="stream_encoder.h::FLAC__stream_encoder_init_file"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_file           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>progress_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode native FLAC files.<p>
This flavor of initialization sets up the encoder to encode to a plain FLAC file. If POSIX fopen() semantics are not sufficient (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__encoder.html#ga58">FLAC__stream_encoder_init_FILE()</a>, or <a class="el" href="group__flac__stream__encoder.html#ga56">FLAC__stream_encoder_init_stream()</a> and provide callbacks for the I/O.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The name of the file to encode to. The file will be opened with fopen(). Use <code>NULL</code> to encode to <code>stdout</code>. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>progress_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga61" doxytag="stream_encoder.h::FLAC__stream_encoder_init_ogg_file"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__stream__encoder.html#ga66">FLAC__StreamEncoderInitStatus</a> FLAC__stream_encoder_init_ogg_file           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__stream__encoder.html#ga11">FLAC__StreamEncoderProgressCallback</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>progress_callback</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>client_data</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the encoder instance to encode Ogg FLAC files.<p>
This flavor of initialization sets up the encoder to encode to a plain Ogg FLAC file. If POSIX fopen() semantics are not sufficient (for example, with Unicode filenames on Windows), you must use <a class="el" href="group__flac__stream__encoder.html#ga59">FLAC__stream_encoder_init_ogg_FILE()</a>, or <a class="el" href="group__flac__stream__encoder.html#ga57">FLAC__stream_encoder_init_ogg_stream()</a> and provide callbacks for the I/O.<p>
This function should be called after <a class="el" href="group__flac__stream__encoder.html#ga12">FLAC__stream_encoder_new()</a> and FLAC__stream_encoder_set_*() but before <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a> or <a class="el" href="group__flac__stream__encoder.html#ga64">FLAC__stream_encoder_process_interleaved()</a>. initialization succeeded.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The name of the file to encode to. The file will be opened with fopen(). Use <code>NULL</code> to encode to <code>stdout</code>. Note however that a proper SEEKTABLE cannot be created when encoding to <code>stdout</code> since it is not seekable. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>progress_callback</em>&nbsp;</td><td>See FLAC__StreamEncoderProgressCallback. This pointer may be <code>NULL</code> if the callback is not desired. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>client_data</em>&nbsp;</td><td>This value will be supplied to callbacks in their <em>client_data</em> argument. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamEncoderInitStatus</em>&nbsp;</td><td><code>FLAC__STREAM_ENCODER_INIT_STATUS_OK</code> if initialization was successful; see FLAC__StreamEncoderInitStatus for the meanings of other return values. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga62" doxytag="stream_encoder.h::FLAC__stream_encoder_finish"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_finish           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>encoder</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Finish the encoding process. Flushes the encoding buffer, releases resources, resets the encoder settings to their defaults, and returns the encoder state to FLAC__STREAM_ENCODER_UNINITIALIZED. Note that this can generate one or more write callbacks before returning, and will generate a metadata callback.<p>
Note that in the course of processing the last frame, errors can occur, so the caller should be sure to check the return value to ensure the file was encoded properly.<p>
In the event of a prematurely-terminated encode, it is not strictly necessary to call this immediately before <a class="el" href="group__flac__stream__encoder.html#ga13">FLAC__stream_encoder_delete()</a> but it is good practice to match every FLAC__stream_encoder_init_*() with a <a class="el" href="group__flac__stream__encoder.html#ga62">FLAC__stream_encoder_finish()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An uninitialized encoder instance. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if an error occurred processing the last frame; or if verify mode is set (see <a class="el" href="group__flac__stream__encoder.html#ga15">FLAC__stream_encoder_set_verify()</a>), there was a verify mismatch; else <code>true</code>. If <code>false</code>, caller should check the state with <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> for more information about the error. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga63" doxytag="stream_encoder.h::FLAC__stream_encoder_process"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_process           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const FLAC__int32 *const &nbsp;</td>
          <td class="mdname" nowrap> <em>buffer</em>[], </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>samples</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Submit data for encoding. This version allows you to supply the input data via an array of pointers, each pointer pointing to an array of <em>samples</em> samples representing one channel. The samples need not be block-aligned, but each channel should have the same number of samples. Each sample should be a signed integer, right-justified to the resolution set by <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].<p>
For applications where channel order is important, channels must follow the order as described in the <a href="../format.html#frame_header">frame header</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An initialized encoder instance in the OK state. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>An array of pointers to each channel's signal. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>samples</em>&nbsp;</td><td>The number of samples in one channel. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state</a>(encoder) == <a class="code" href="group__flac__stream__encoder.html#gga65a12">FLAC__STREAM_ENCODER_OK</a> 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if successful, else <code>false</code>; in this case, check the encoder state with <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> to see what went wrong. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga64" doxytag="stream_encoder.h::FLAC__stream_encoder_process_interleaved"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__stream_encoder_process_interleaved           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamEncoder.html">FLAC__StreamEncoder</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>encoder</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const FLAC__int32&nbsp;</td>
          <td class="mdname" nowrap> <em>buffer</em>[], </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>samples</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Submit data for encoding. This version allows you to supply the input data where the channels are interleaved into a single array (i.e. channel0_sample0, channel1_sample0, ... , channelN_sample0, channel0_sample1, ...). The samples need not be block-aligned but they must be sample-aligned, i.e. the first value should be channel0_sample0 and the last value channelN_sampleM. Each sample should be a signed integer, right-justified to the resolution set by <a class="el" href="group__flac__stream__encoder.html#ga18">FLAC__stream_encoder_set_bits_per_sample()</a>. For example, if the resolution is 16 bits per sample, the samples should all be in the range [-32768,32767].<p>
For applications where channel order is important, channels must follow the order as described in the <a href="../format.html#frame_header">frame header</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>encoder</em>&nbsp;</td><td>An initialized encoder instance in the OK state. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>An array of channel-interleaved data (see above). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>samples</em>&nbsp;</td><td>The number of samples in one channel, the same as for <a class="el" href="group__flac__stream__encoder.html#ga63">FLAC__stream_encoder_process()</a>. For example, if encoding two channels, <code>1000</code> <em>samples</em> corresponds to a <em>buffer</em> of 2000 values. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> encoder != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> <a class="code" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state</a>(encoder) == <a class="code" href="group__flac__stream__encoder.html#gga65a12">FLAC__STREAM_ENCODER_OK</a> 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if successful, else <code>false</code>; in this case, check the encoder state with <a class="el" href="group__flac__stream__encoder.html#ga35">FLAC__stream_encoder_get_state()</a> to see what went wrong. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="ga0" doxytag="stream_encoder.h::FLAC__StreamEncoderStateString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga0">FLAC__StreamEncoderStateString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderState to a C string.<p>
Using a FLAC__StreamEncoderState as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>
<a class="anchor" name="ga1" doxytag="stream_encoder.h::FLAC__StreamEncoderInitStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga1">FLAC__StreamEncoderInitStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderInitStatus to a C string.<p>
Using a FLAC__StreamEncoderInitStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="stream_encoder.h::FLAC__StreamEncoderReadStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga2">FLAC__StreamEncoderReadStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderReadStatus to a C string.<p>
Using a FLAC__StreamEncoderReadStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="stream_encoder.h::FLAC__StreamEncoderWriteStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga3">FLAC__StreamEncoderWriteStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderWriteStatus to a C string.<p>
Using a FLAC__StreamEncoderWriteStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="stream_encoder.h::FLAC__StreamEncoderSeekStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga4">FLAC__StreamEncoderSeekStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderSeekStatus to a C string.<p>
Using a FLAC__StreamEncoderSeekStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="stream_encoder.h::FLAC__StreamEncoderTellStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__stream__encoder.html#ga5">FLAC__StreamEncoderTellStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__StreamEncoderTellStatus to a C string.<p>
Using a FLAC__StreamEncoderTellStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>

<hr size="1">
<div class="copyright">
	<!-- @@@ oh so hacky -->
	<table>
		<tr>
			<td align="left">
				Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
			</td>
			<td width="1%" align="right">
				<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
			</td>
		</tr>
	</table>
</div>
<!-- Copyright (c)  2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>