FS#8961 - Anti-Aliased Fonts.
[kugel-rb/myfork.git] / apps / codecs / libmusepack / streaminfo.h
blob6c4b4ca1087562ba14e0a6fe91bfc2ab2fcf08bc
1 /*
2 Copyright (c) 2005, The Musepack Development Team
3 All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
12 * Redistributions in binary form must reproduce the above
13 copyright notice, this list of conditions and the following
14 disclaimer in the documentation and/or other materials provided
15 with the distribution.
17 * Neither the name of the The Musepack Development Team nor the
18 names of its contributors may be used to endorse or promote
19 products derived from this software without specific prior
20 written permission.
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /// \file streaminfo.h
37 #ifndef _mpcdec_streaminfo_h_
38 #define _mpcdec_streaminfo_h_
40 typedef mpc_int32_t mpc_streaminfo_off_t;
42 /// \brief mpc stream properties structure
43 ///
44 /// Structure containing all the properties of an mpc stream. Populated
45 /// by the streaminfo_read function.
46 typedef struct mpc_streaminfo {
47 /// @name core mpc stream properties
48 //@{
49 mpc_uint32_t sample_freq; ///< sample frequency of stream
50 mpc_uint32_t channels; ///< number of channels in stream
51 mpc_streaminfo_off_t header_position; ///< byte offset of position of header in stream
52 mpc_uint32_t stream_version; ///< streamversion of stream
53 mpc_uint32_t bitrate; ///< bitrate of stream file (in bps)
54 double average_bitrate; ///< average bitrate of stream (in bits/sec)
55 mpc_uint32_t frames; ///< number of frames in stream
56 mpc_int64_t pcm_samples;
57 mpc_uint32_t max_band; ///< maximum band-index used in stream (0...31)
58 mpc_uint32_t is; ///< intensity stereo (0: off, 1: on)
59 mpc_uint32_t ms; ///< mid/side stereo (0: off, 1: on)
60 mpc_uint32_t block_size; ///< only needed for SV4...SV6 -> not supported
61 mpc_uint32_t profile; ///< quality profile of stream
62 const char* profile_name; ///< name of profile used by stream
63 //@}
65 /// @name replaygain related fields
66 //@{
67 mpc_int16_t gain_title; ///< replaygain title value
68 mpc_int16_t gain_album; ///< replaygain album value
69 mpc_uint16_t peak_album; ///< peak album loudness level
70 mpc_uint16_t peak_title; ///< peak title loudness level
71 //@}
73 /// @name true gapless support data
74 //@{
75 mpc_uint32_t is_true_gapless; ///< true gapless? (0: no, 1: yes)
76 mpc_uint32_t last_frame_samples; ///< number of valid samples within last frame
78 mpc_uint32_t encoder_version; ///< version of encoder used
79 char encoder[256]; ///< encoder name
81 mpc_streaminfo_off_t tag_offset; ///< offset to file tags
82 mpc_streaminfo_off_t total_file_length; ///< total length of underlying file
83 //@}
84 } mpc_streaminfo;
86 #endif // _mpcdec_streaminfo_h_