Fix up configure and buildzip/wpsbuild.pl a bit
[kugel-rb.git] / apps / codecs / libmusepack / streaminfo.h
blob739d40acf3232e085b5274d3ae1b9db47be3640c
1 /*
2 Copyright (c) 2005-2009, 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.
34 /// \file streaminfo.h
35 #ifndef _MPCDEC_STREAMINFO_H_
36 #define _MPCDEC_STREAMINFO_H_
37 #ifdef WIN32
38 #pragma once
39 #endif
41 #include "mpc_types.h"
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
48 typedef mpc_int32_t mpc_streaminfo_off_t;
50 /// \brief mpc stream properties structure
51 ///
52 /// Structure containing all the properties of an mpc stream. Populated
53 /// by the streaminfo_read function.
54 typedef struct mpc_streaminfo {
55 /// @name Core mpc stream properties
56 //@{
57 mpc_uint32_t sample_freq; ///< Sample frequency of stream
58 mpc_uint32_t channels; ///< Number of channels in stream
59 mpc_uint32_t stream_version; ///< Streamversion of stream
60 mpc_uint32_t bitrate; ///< Bitrate of stream file (in bps)
61 double average_bitrate; ///< Average bitrate of stream (in bits/sec)
62 mpc_uint32_t max_band; ///< Maximum band-index used in stream (0...31)
63 mpc_uint32_t ms; ///< Mid/side stereo (0: off, 1: on)
64 mpc_uint32_t fast_seek; ///< True if stream supports fast-seeking (sv7)
65 mpc_uint32_t block_pwr; ///< Number of frames in a block = 2^block_pwr (sv8)
66 //@}
68 /// @name Replaygain properties
69 //@{
70 mpc_uint16_t gain_title; ///< Replaygain title value
71 mpc_uint16_t gain_album; ///< Replaygain album value
72 mpc_uint16_t peak_album; ///< Peak album loudness level
73 mpc_uint16_t peak_title; ///< Peak title loudness level
74 //@}
76 /// @name True gapless properties
77 //@{
78 mpc_uint32_t is_true_gapless; ///< True gapless? (0: no, 1: yes)
79 mpc_uint64_t samples; ///< Number of samples in the stream
80 mpc_uint64_t beg_silence; ///< Number of samples that must not be played at the beginning of the stream
81 //@}
83 /// @name Encoder informations
84 //@{
85 mpc_uint32_t encoder_version; ///< Version of encoder used
86 /* rockbox: not used
87 char encoder[256]; ///< Encoder name
89 mpc_bool_t pns; ///< pns used
90 float profile; ///< Quality profile of stream
91 /* rockbox: not used
92 const char* profile_name; ///< Name of profile used by stream
94 //@}
97 mpc_streaminfo_off_t header_position; ///< Byte offset of position of header in stream
98 mpc_streaminfo_off_t tag_offset; ///< Offset to file tags
99 mpc_streaminfo_off_t total_file_length; ///< Total length of underlying file
100 } mpc_streaminfo;
102 /* rockbox: not used
103 /// Gets length of stream si, in seconds.
104 /// \return length of stream in seconds
105 MPC_API double mpc_streaminfo_get_length(mpc_streaminfo *si);
107 /// Returns length of stream si, in samples.
108 /// \return length of stream in samples
109 MPC_API mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si);
111 #ifdef __cplusplus
113 #endif
114 #endif