This file is indexed.

/usr/lib/perl5/pods/SDL/Mixer.pod is in libsdl-perl 2.540-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
=pod

=head1 NAME

SDL::Mixer - Sound and music functions

=head1 CATEGORY

Mixer

=head1 CONSTANTS

The constants are exported by default. You can avoid this by doing:

 use SDL::Mixer ();

and access them directly:

 SDL::Mixer::MIX_DEFAULT_FREQUENCY;

or by choosing the export tags below:

Export tag: ':init'

 MIX_INIT_FLAC
 MIX_INIT_MOD
 MIX_INIT_MP3
 MIX_INIT_OGG

Export tag: ':defaults'

 MIX_CHANNELS
 MIX_DEFAULT_FORMAT
 MIX_DEFAULT_FREQUENCY
 MIX_DEFAULT_CHANNELS
 MIX_MAX_VOLUME
 MIX_CHANNEL_POST

Export tag: ':fading'

 MIX_NO_FADING
 MIX_FADING_OUT
 MIX_FADING_IN

Export tag: ':type'

 MUS_NONE
 MUS_CMD
 MUS_WAV
 MUS_MOD
 MUS_MID
 MUS_OGG
 MUS_MP3
 MUS_MP3_MAD
 MUS_MP3_FLAC

Export tag: ':format'

 AUDIO_U8
 AUDIO_S8
 AUDIO_U16LSB
 AUDIO_S16LSB
 AUDIO_U16MSB
 AUDIO_S16MSB
 AUDIO_U16
 AUDIO_S16 
 AUDIO_U16SYS
 AUDIO_S16SYS

Export tag: ':status'

 SDL_AUDIO_STOPPED
 SDL_AUDIO_PLAYING
 SDL_AUDIO_PAUSED

=head1 DESCRIPTION

SDL::Mixer allows you to enable sound, alter music volume settings, and lets you play, pause and resume, as well as fading the sound and music 
in and out.

=head2 Supported Formats

The SDL Mixer library is a multi-channel audio mixer. It supports I<8 channels> of B<16 bit> stereo audio, and a I<single channel for music>.

You can use the channels to load samples (i.e. sound effects) in the following formats:

=over 4

=item * Microsoft WAVE files (WAV)

=item * Creative Labs VOC files (VOC)

=item * MIDI files (if compiled with Timidity)

=back

If you use MIDI, you should note that the process of mixing MIDI files to wave output is very CPU-intensive, so if playing regular WAVE
files sound great, but playing MIDI files sound choppy, try using 8-bit audio, mono audio, or lower frequencies.

The music channel can play the following formats:

=over 4

=item * AIFF

=item * MOD (.mod .xm .s3m .669 .it .med and more - if compiled with libmikmod)

=item * OggVorbis (.ogg - if compiled with ogg/vorbis libraries)

=item * MP3 (if compiled with SMPEG or MAD libraries)

=item * FLAC (if compiled with FLAC library)

=back


=head1 METHODS
  
=head2 init

 my $init_flags = SDL::Mixer::init( $flags );

Loads dynamic libraries and prepares them for use. Flags should be one or more flags from init flags OR'd together.
It returns the flags successfully initialized, or 0 on failure.

Example:

 use SDL::Mixer;
 
 my $init_flags = SDL::Mixer::init( MIX_INIT_MP3 | MIX_INIT_MOD | MIX_INIT_FLAC | MIX_INIT_OGG );
 
 print("We have MP3 support!\n")  if $init_flags & MIX_INIT_MP3;
 print("We have MOD support!\n")  if $init_flags & MIX_INIT_MOD;
 print("We have FLAC support!\n") if $init_flags & MIX_INIT_FLAC;
 print("We have OGG support!\n")  if $init_flags & MIX_INIT_OGG;

Flags:

=over 4

=item *

MIX_INIT_MP3

=item *

MIX_INIT_MOD

=item *

MIX_INIT_FLAC

=item *

MIX_INIT_OGG

=back

B<Note>: Only available for SDL_mixer >= 1.2.10

=head2 quit

 SDL::Mixer::quit();

This function unloads the libraries previously loaded with L<init()|/init>.

B<Note>: Only available for SDL_mixer >= 1.2.10

=head2 linked_version

 $version = SDL::Mixer::linked_version();

C<linked_version> gives you the major-, minor-, and patchlevel for SDL_mixer. This way you can check if e.g. L<init()|/init> and L<quit()|/quit> 
are available.
 
Example:

 use SDL::Mixer;
 use SDL::Version;
 
 my $version = SDL::Mixer::linked_version();

 printf("%d.%d.%d\n", $version->major, $version->minor, $version->patch); # prints "1.2.8" for me

=head2 open_audio

 my $audio_opened = SDL::Mixer::open_audio( $frequency, $format, $channels, $chunksize );

C<open_audio> will initialize SDL_mixer if it is not yet initialized, see note. SDL_mixer may not be able to provide the exact specifications 
your provided, however it will automatically translate between the expected format and the real one. You can retrieve the real format using 
L<query_spec>. 

Returns 0 on success, -1 on error.

B<Note>: You must not use C<AUDIO_S16>, C<AUDIO_U16>, C<AUDIO_S16LSB>, or C<AUDIO_U16LSB.> They are not portable, and SDL will not return an 
error code when they fail. The result will be a horrible staticy noise. You can usually use C<AUDIO_S16SYS>, though not always. Future versions 
of SDL should take this parameter only as a hint, then read back the value that the OS (for example, OSS or ALSA) has chosen to use in case the 
desired audio type is not supported. 

B<Note>: When already initialized, this function will not re-initialize SDL_mixer, nor fail. It will merely increment the number of times 
L<SDL::Mixer::close_audio|SDL::Mixer/"close_audio"> must be called to actually get it to uninitialize. This serves as a very simplistic method for multiple application 
components to use SDL_mixer without necessitating a great deal of inter-component awareness. Be warned however that in such a situation, the 
latest components to initialize SDL_mixer will probably not get the SDL_mixer settings they're expecting. 

Example:

 use SDL;
 use SDL::Mixer;
 
 printf("Error initializing SDL_mixer: %s\n", SDL::get_error()) unless SDL::Mixer::open_audio(44100, AUDIO_S16, 2, 1024) == 0;

=head2 close_audio

 SDL::Mixer::close_audio();

Close the mixer and halting all playing audio. This function does not return anything.

=head2 query_spec

 my @query_spec = @{ SDL::Mixer::query_spec() };

Find out what the actual audio device parameters are.
This function returns 1 as first array element (status) if the audio has been opened, 0 otherwise.

Example:

 use SDL::Mixer;
 
 my ($status, $freq, $format, $channels) = @{ SDL::Mixer::query_spec() };
 
 printf("%s, %s, %s, %s\n", $status, $freq, $format, $channels);

=head1 SEE ALSO

L<perl>, L<SDL::Mixer::Channels>, L<SDL::Mixer::Effects>, L<SDL::Mixer::Groups>, L<SDL::Mixer::Music>.

=head1 AUTHORS

See L<SDL/AUTHORS>.

=cut