Index

Package: Almp3

Description

package Almp3 is

Types

ALMP3_MP3

type ALMP3_MP3 is private;

References:

almp3.ads:18:10 (declaration)
almp3.ads:19:30 (reference)
almp3.ads:394:10 (full declaration)

A_mp3

type A_mp3 is access all ALMP3_MP3;

References:

almp3.ads:19:10 (declaration)
almp3.adb:11:41 (reference)
almp3.adb:13:40 (reference)
almp3.adb:39:49 (reference)
almp3.adb:46:46 (reference)
almp3.ads:38:70 (reference)
almp3.ads:44:41 (reference)
almp3.ads:68:46 (reference)
almp3.ads:86:49 (reference)
almp3.ads:99:40 (reference)
almp3.ads:106:42 (reference)
almp3.ads:113:51 (reference)
almp3.ads:114:50 (reference)
almp3.ads:115:49 (reference)
almp3.ads:116:50 (reference)
almp3.ads:123:51 (reference)
almp3.ads:124:50 (reference)
almp3.ads:125:49 (reference)
almp3.ads:126:50 (reference)
almp3.ads:129:45 (reference)
almp3.ads:152:39 (reference)
almp3.ads:158:50 (reference)
almp3.ads:161:49 (reference)
almp3.ads:165:49 (reference)
almp3.ads:166:48 (reference)
almp3.ads:167:47 (reference)
almp3.ads:168:48 (reference)
almp3.ads:171:52 (reference)
almp3.ads:172:50 (reference)
almp3.ads:173:51 (reference)
almp3.ads:174:51 (reference)
almp3.ads:177:45 (reference)
almp3.ads:181:46 (reference)
almp3.ads:185:44 (reference)
almp3.ads:187:48 (reference)
almp3.ads:190:48 (reference)
almp3.ads:191:53 (reference)
almp3.ads:192:48 (reference)
almp3.ads:201:53 (reference)
almp3.ads:214:58 (reference)
almp3.ads:220:45 (reference)
almp3.ads:224:45 (reference)
almp3.ads:227:50 (reference)
audio_players-cache.ads:121:19 (reference)

ALMP3_MP3STREAM

type ALMP3_MP3STREAM is private;

References:

almp3.ads:21:10 (declaration)
almp3.ads:22:36 (reference)
almp3.ads:395:10 (full declaration)

A_mp3stream

type A_mp3stream is access all ALMP3_MP3STREAM;

References:

almp3.ads:22:10 (declaration)
almp3.adb:25:47 (reference)
almp3.adb:27:46 (reference)
almp3.ads:239:39 (reference)
almp3.ads:247:42 (reference)
almp3.ads:251:47 (reference)
almp3.ads:255:52 (reference)
almp3.ads:263:55 (reference)
almp3.ads:270:46 (reference)
almp3.ads:276:50 (reference)
almp3.ads:290:45 (reference)
almp3.ads:295:56 (reference)
almp3.ads:298:55 (reference)
almp3.ads:308:51 (reference)
almp3.ads:317:53 (reference)
almp3.ads:322:58 (reference)
almp3.ads:323:56 (reference)
almp3.ads:324:57 (reference)
almp3.ads:325:57 (reference)
almp3.ads:328:55 (reference)
almp3.ads:329:54 (reference)
almp3.ads:330:53 (reference)
almp3.ads:331:54 (reference)
almp3.ads:332:60 (reference)
almp3.ads:333:52 (reference)
almp3.ads:334:50 (reference)
almp3.ads:336:54 (reference)
almp3.ads:339:54 (reference)
almp3.ads:340:59 (reference)
almp3.ads:341:54 (reference)
almp3.ads:353:64 (reference)
almp3.ads:358:51 (reference)
almp3.ads:364:56 (reference)
almp3.ads:374:56 (reference)
almp3.ads:375:55 (reference)
almp3.ads:376:54 (reference)
almp3.ads:377:55 (reference)
almp3.ads:387:56 (reference)
almp3.ads:388:55 (reference)
almp3.ads:389:54 (reference)
almp3.ads:390:55 (reference)

Constants & Global variables

ALMP3_OK (integer)

ALMP3_OK                    : constant Integer :=  0;

References:

almp3.ads:8:5 (declaration)
audio_players-cache.adb:257:20 (reference)

ALMP3_PLAY_BUFFERTOOSMALL (integer)

ALMP3_PLAY_BUFFERTOOSMALL   : constant Integer := -1;

References:

almp3.ads:9:5 (declaration)
audio_players-cache.adb:254:31 (reference)

ALMP3_POLL_PLAYJUSTFINISHED (integer)

ALMP3_POLL_PLAYJUSTFINISHED : constant Integer :=  1;

References:

almp3.ads:10:5 (declaration)
audio_players-cache.adb:272:18 (reference)

ALMP3_POLL_NOTPLAYING (integer)

ALMP3_POLL_NOTPLAYING       : constant Integer := -1;

References:

almp3.ads:11:5 (declaration)
audio_players-cache.adb:273:18 (reference)

ALMP3_POLL_FRAMECORRUPT (integer)

ALMP3_POLL_FRAMECORRUPT     : constant Integer := -2;

References:

almp3.ads:12:5 (declaration)
audio_players-cache.adb:275:18 (reference)

ALMP3_POLL_BUFFERUNDERRUN (integer)

ALMP3_POLL_BUFFERUNDERRUN   : constant Integer := -3;

References:

almp3.ads:13:5 (declaration)

ALMP3_POLL_INTERNALERROR (integer)

ALMP3_POLL_INTERNALERROR    : constant Integer := -4;

References:

almp3.ads:14:5 (declaration)
audio_players-cache.adb:278:18 (reference)

ALMP3_PLAY_SPEED_NORMAL (integer)

ALMP3_PLAY_SPEED_NORMAL     : constant Integer := 1000;

References:

almp3.ads:16:5 (declaration)
audio_players-cache.adb:251:43 (reference)

Subprograms & Entries

Almp3_Version

function Almp3_Version return String;

References:

almp3.ads:27:14 (declaration)
almp3.adb:4:14 (body)
almp3.adb:7:9 (label)
almp3.ads:28:27 (reference)
applications.adb:286:41 (reference)

Called by:

Applications.Init defined at applications.ads:113:14
Returns the version string for the library.

Create_mp3

function Create_mp3
( data: Address;
data_len: Natural )
return A_mp3;

References:

almp3.ads:38:14 (declaration)
almp3.ads:399:23 (body)
audio_players-cache.adb:219:36 (reference)

Called by:

Audio_Players.Cache.Create_Mp3_Sound defined at audio_players-cache.ads:125:14
return values: NULL if there ocurred an error (mostly an invalid mp3 data was passed). Other value ( != NULL ) otherwise.

Destroy_mp3

procedure Destroy_mp3
( mp3: in out A_mp3 );

References:

almp3.ads:44:15 (declaration)
almp3.adb:11:15 (body)
almp3.adb:21:9 (label)
audio_players-cache.adb:238:9 (reference)

Called by:

Audio_Players.Cache.Delete defined at audio_players-cache.ads:128:15

Calls:

Almp3.Destroy_mp3.C_Destroy_mp3 defined at almp3.adb:13:19
Destroys the ALMP3_MP3 automatically stopping it. Note this function checks if the 'mp3' pointer is pointing to NULL, so a null pointer won't crash the program.

Play_mp3

function Play_mp3
( mp3: not null A_mp3;
buffer_len: Natural;
vol: Volume_Type;
pan: Pan_Type )
return Integer;

References:

almp3.ads:68:14 (declaration)
almp3.ads:400:23 (body)
Plays the 'mp3' ALMP3_MP3 with the given volume 'vol' (from 0 to 255) and panning 'pan' (from 0 to 255, where 0 is full left and 255 is full right). 'buffer_len' is the desired size in bytes of the buffer where the decoded data will be stored. The bigger, the less you'll have to poll the MP3, but the more time you will have to wait in order to hear the song start playing. Note that due to some mp3 format limitations, the internal (and real) buffer will be an aproximation to the 'buffer_len' given. A 'buffer_len' size between 16384 and 32768 bytes (16kb and 32kb) will do in most cases. return values: ALMP3_OK if no problems. ALMP3_PLAY_BUFFERTOOSMALL if the given 'buffer_len' was not big enough. special note: This function also works like a "resume" function, since it won't rewind the ALMP3_MP3 automatically. Note that once the ALMP3_MP3 has reached the end when playing, it will rewind though, stoping the ALMP3_MP3 if the loop flag was set at FALSE (see ALMP3_Play_Ex_mp3()) or continuing playing it if it was set at TRUE. Also note that this automatically stops decoding.

Play_Ex_mp3

function Play_Ex_mp3
( mp3: not null A_mp3;
buffer_len: Natural;
vol: Volume_Type;
pan: Pan_Type;
speed: Positive;
doloop: Boolean )
return Integer;

References:

almp3.ads:86:14 (declaration)
almp3.adb:39:14 (body)
almp3.adb:60:9 (label)
audio_players-cache.adb:250:21 (reference)

Called by:

Audio_Players.Cache.Play defined at audio_players-cache.ads:130:15

Calls:

Almp3.Play_Ex_mp3.C_Play_Ex_mp3 defined at almp3.adb:46:18
See ALMP3_Play_mp3(). The only addition is the 'speed' that will play the ALMP3_MP3 at a given speed (being 1000 = normal speed, 2000 = twice fast, 500 = half speed and so on) and a loop flag that can be set to not stop the ALMP3_MP3 when it has reached the end, but continue it playing from the start. return values: See ALMP3_Play_mp3(). special note: See ALMP3_Play_mp3(). Note that you can change speed, pan, volume, etc values to the ALMP3_MP3 many times, but you will need to stop it first.

Stop_mp3

procedure Stop_mp3
( mp3: not null A_mp3 );

References:

almp3.ads:99:15 (declaration)
almp3.ads:401:23 (body)
audio_players-cache.adb:292:13 (reference)

Called by:

Audio_Players.Cache.Stop defined at audio_players-cache.ads:134:15
Stops the ALMP3_MP3 if it was playing. special note: This function also works like a "pause" function, since it won't rewind it automatically.

Rewind_mp3

procedure Rewind_mp3
( mp3: not null A_mp3 );

References:

almp3.ads:106:15 (declaration)
almp3.ads:402:23 (body)
Rewinds the ALMP3_MP3 to its start. special note: This function won't automatically stop the ALMP3_MP3 if it was already playing.

Seek_Abs_Frames_mp3

procedure Seek_Abs_Frames_mp3
( mp3: not null A_mp3;
frame: Natural );

References:

almp3.ads:113:15 (declaration)
almp3.ads:403:23 (body)
Does an absolute seek (from start of the mp3), given the new position either in frames, msecs, secs or bytes. special note: This function won't stop the ALMP3_MP3 if it was already playing.

Seek_Abs_Msecs_mp3

procedure Seek_Abs_Msecs_mp3
( mp3: not null A_mp3;
msecs: Natural );

References:

almp3.ads:114:15 (declaration)
almp3.ads:404:23 (body)

Seek_Abs_Secs_mp3

procedure Seek_Abs_Secs_mp3
( mp3: not null A_mp3;
secs: Natural );

References:

almp3.ads:115:15 (declaration)
almp3.ads:405:23 (body)

Seek_Abs_Bytes_mp3

procedure Seek_Abs_Bytes_mp3
( mp3: not null A_mp3;
bytes: Natural );

References:

almp3.ads:116:15 (declaration)
almp3.ads:406:23 (body)

Seek_Rel_Frames_mp3

procedure Seek_Rel_Frames_mp3
( mp3: not null A_mp3;
frame: Integer );

References:

almp3.ads:123:15 (declaration)
almp3.ads:407:23 (body)
Does a relative seek (from current position), given the new position either in frames, msecs, secs or bytes. special note: This function won't stop the ALMP3_MP3 if it was already playing.

Seek_Rel_Msecs_mp3

procedure Seek_Rel_Msecs_mp3
( mp3: not null A_mp3;
msec: Integer );

References:

almp3.ads:124:15 (declaration)
almp3.ads:408:23 (body)

Seek_Rel_Secs_mp3

procedure Seek_Rel_Secs_mp3
( mp3: not null A_mp3;
sec: Integer );

References:

almp3.ads:125:15 (declaration)
almp3.ads:409:23 (body)

Seek_Rel_Bytes_mp3

procedure Seek_Rel_Bytes_mp3
( mp3: not null A_mp3;
bytes: Integer );

References:

almp3.ads:126:15 (declaration)
almp3.ads:410:23 (body)

Adjust_mp3

procedure Adjust_mp3
( mp3: not null A_mp3;
vol: Volume_Type;
pan: Pan_Type;
speed: Positive;
doloop: Natural );

References:

almp3.ads:129:15 (declaration)
almp3.ads:411:23 (body)
Adjust the ALMP3_MP3 parameters when it is already playing.

Poll_mp3

function Poll_mp3
( mp3: not null A_mp3 )
return Integer;

References:

almp3.ads:152:14 (declaration)
almp3.ads:412:23 (body)
audio_players-cache.adb:270:17 (reference)

Called by:

Audio_Players.Cache.Poll defined at audio_players-cache.ads:132:15
This function needs to be called in order to keep the ALMP3_MP3 playing properly, since the mp3s need to be decoded at real time (either that, or to a huge memory buffer). return values: ALMP3_OK if there were no error. ALMP3_POLL_PLAYJUSTFINISHED (only once) when the file has JUST finished playing. ALMP3_POLL_NOTPLAYING if the file is not playing. ALMP3_POLL_FRAMECORRUPT if one of the frames is corrupt. ALMP3_POLL_INTERNALERROR if an internal error happened. special note: If you don't want (or can't) poll all the time, you can use automatic polling (see below), but I don't recommend this since this can be very unstable, specially under DOS (although I've never experienced such problems myself, but better warn ;).

Start_Autopoll_mp3

procedure Start_Autopoll_mp3
( mp3: not null A_mp3;
speed: Positive );

References:

almp3.ads:158:15 (declaration)
almp3.ads:413:23 (body)
Creates an allegro interrupt that will call poll for this ALMP3_MP3 each 'speed' msecs. This frees you from calling polling yourself, but I recommend this only in the case you can't call poll (because of the nature of your program) yourself at regular intervals.

Stop_Autopoll_mp3

procedure Stop_Autopoll_mp3
( mp3: not null A_mp3 );

References:

almp3.ads:161:15 (declaration)
almp3.ads:414:23 (body)
Destroys the allegro interrupt for that ALMP3_MP3.

Get_Pos_Frames_mp3

function Get_Pos_Frames_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:165:14 (declaration)
almp3.ads:415:23 (body)
Returns the ALMP3_MP3 current position either in frames, msecs, secs or bytes.

Get_Pos_Msecs_mp3

function Get_Pos_Msecs_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:166:14 (declaration)
almp3.ads:416:23 (body)

Get_Pos_Secs_mp3

function Get_Pos_Secs_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:167:14 (declaration)
almp3.ads:417:23 (body)

Get_Pos_Bytes_mp3

function Get_Pos_Bytes_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:168:14 (declaration)
almp3.ads:418:23 (body)

Get_Length_Frames_mp3

function Get_Length_Frames_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:171:14 (declaration)
almp3.ads:419:23 (body)
Returns the ALMP3_MP3 length either in frames, msecs, secs or bytes.

Get_Length_Secs_mp3

function Get_Length_Secs_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:172:14 (declaration)
almp3.ads:420:23 (body)

Get_Length_Msecs_mp3

function Get_Length_Msecs_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:173:14 (declaration)
almp3.ads:421:23 (body)

Get_Length_Bytes_mp3

function Get_Length_Bytes_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:174:14 (declaration)
almp3.ads:422:23 (body)

Get_Msecs_Per_Frame_mp3

function Get_Msecs_Per_Frame_mp3
( mp3: A_mp3 )
return Natural;

References:

almp3.ads:177:14 (declaration)
almp3.ads:423:23 (body)
Returns the msecs per frame for the given ALMP3_MP3.

Get_Bitrate_mp3

function Get_Bitrate_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:181:14 (declaration)
almp3.ads:424:23 (body)
Returns the ALMP3_MP3 bitrate in bits per second, NOT in kbits. That's for example 128000, 64000, 96000, etc.

Get_Layer_mp3

function Get_Layer_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:185:14 (declaration)
almp3.ads:425:23 (body)
Returns 3 on MPEG-audio layer III (this is, mp3) or 2 on MPEG-audio layer II (mp2).

Get_Is_Stereo_mp3

function Get_Is_Stereo_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:187:14 (declaration)
almp3.ads:426:23 (body)

Get_Wave_Bits_mp3

function Get_Wave_Bits_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:190:14 (declaration)
almp3.ads:427:23 (body)
Returns info about the wave.

Get_Wave_Is_Stereo_mp3

function Get_Wave_Is_Stereo_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:191:14 (declaration)
almp3.ads:428:23 (body)

Get_Wave_Freq_mp3

function Get_Wave_Freq_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:192:14 (declaration)
almp3.ads:429:23 (body)

Create_Sample_From_mp3

function Create_Sample_From_mp3
( mp3: not null A_mp3 )
return A_Sample;

References:

almp3.ads:201:14 (declaration)
almp3.ads:430:23 (body)
Decodes the given ALMP3_MP3 into an Allegro SAMPLE structure. Please note for big mp3s this function could generate a HUGE SAMPLE, so it is only recommended for very small mp3s like sound effects. return values: NULL on error. otherwise not NULL.

Get_Output_Wave_mp3

function Get_Output_Wave_mp3
( mp3: not null A_mp3;
buffer_size: access Natural )
return Address;

References:

almp3.ads:214:14 (declaration)
almp3.ads:431:23 (body)
Returns a pointer to the piece of wave decoded after each poll, and the size of this buffer as well in 'buffer_size' (in bytes). Note this function will NOT automatically convert from unsinged to signed 16 bit data using the Allegro format instead of the standard format, so this data cannot be saved directly into a WAV for example without modifications. Also note in order for this function to work, the mp3 stream needs to BE playing. return values: NULL if there is no wave being decoded. Else the buffer with the wave data.

Is_Playing_mp3

function Is_Playing_mp3
( mp3: not null A_mp3 )
return Natural;

References:

almp3.ads:220:14 (declaration)
almp3.ads:432:23 (body)
Returns TRUE if the ALMP3_MP3 is currently being played or FALSE if it is not.

Is_Looping_mp3

function Is_Looping_mp3
( mp3: not null A_mp3 )
return Integer;

References:

almp3.ads:224:14 (declaration)
almp3.ads:433:23 (body)
Self explanatory. Note this function only works when the ALMP3_MP3 is playing.

Get_Audiostream_mp3

function Get_Audiostream_mp3
( mp3: not null A_mp3 )
return A_Audiostream;

References:

almp3.ads:227:14 (declaration)
almp3.ads:434:23 (body)
Returns the allegro AUDIOSTREAM currently being used by the ALMP3_MP3.

Create_mp3stream

function Create_mp3stream
( first_data_buffer: Address;
data_buffer_len, last_block: Natural )
return A_mp3stream;

References:

almp3.ads:236:14 (declaration)
almp3.ads:436:23 (body)
See almp3_create_mp3(). The only difference is that 'first_data_buffer' contains the very first buffer of len 'data_buffer_len' that you will have to give to the MP3STREAM periodically. If after this data, there won't be more (this is, this was the last buffer to be processed), pass TRUE to 'last_block'.

Create_mp3stream_Ex

function Create_mp3stream_Ex
( first_data_buffer: Address;
data_buffer_len, last_block, downsample, downmix: Natural )
return A_mp3stream;

References:

almp3.ads:242:14 (declaration)
almp3.ads:437:23 (body)

Destroy_mp3stream

procedure Destroy_mp3stream
( mp3: in out A_mp3stream );

References:

almp3.ads:251:15 (declaration)
almp3.adb:25:15 (body)
almp3.adb:35:9 (label)

Calls:

Almp3.Destroy_mp3stream.C_Destroy_mp3stream defined at almp3.adb:27:19
See almp3_destroy_mp3().

Play_mp3stream

function Play_mp3stream
( mp3: not null A_mp3stream;
buffer_len: Natural;
vol: Volume_Type;
pan: Pan_Type )
return Integer;

References:

almp3.ads:255:14 (declaration)
almp3.ads:438:23 (body)
See almp3_play_ex_mp3stream().

Play_Ex_mp3stream

function Play_Ex_mp3stream
( mp3: not null A_mp3stream;
buffer_len: Natural;
vol: Volume_Type;
pan: Pan_Type;
speed: Positive )
return Integer;

References:

almp3.ads:263:14 (declaration)
almp3.ads:439:23 (body)
See almp3_play_ex_mp3(). The only difference is that here is no 'loop' parameter. To loop an ALMP3_MP3STREAM just destroy the ALMP3_MP3STREAM and recreate it (or pass data continuosly).

Stop_mp3stream

procedure Stop_mp3stream
( mp3: not null A_mp3stream );

References:

almp3.ads:270:15 (declaration)
almp3.ads:440:23 (body)
See almp3_stop_mp3().

Adjust_mp3stream

procedure Adjust_mp3stream
( mp3: not null A_mp3stream;
vol: Volume_Type;
pan: Pan_Type;
speed: Positive );

References:

almp3.ads:276:15 (declaration)
almp3.ads:441:23 (body)
Adjust the ALMP3_MP3STREAM parameters when it is already playing. Note it doesn't include the parameter loop because ALMP3_MP3STREAMs are always looping (or better said, they don't have two points to loop from/to).

Poll_mp3stream

function Poll_mp3stream
( mp3: not null A_mp3stream )
return Integer;

References:

almp3.ads:290:14 (declaration)
almp3.ads:442:23 (body)
See almp3_poll_mp3(). return values: ALMP3_OK if there were no error. ALMP3_POLL_PLAYJUSTFINISHED (only once) when the file has JUST finished playing. ALMP3_POLL_NOTPLAYING if the file is not playing. ALMP3_POLL_FRAMECORRUPT if one of the frames is corrupt. ALMP3_POLL_BUFFERUNDERUN if the buffer was exhausted. ALMP3_POLL_INTERNALERROR if an internal error happened.

Start_Autopoll_mp3stream

procedure Start_Autopoll_mp3stream
( mp3: not null A_mp3stream;
speed: Positive );

References:

almp3.ads:295:15 (declaration)
almp3.ads:443:23 (body)
See almp3_start_autopoll_mp3(). Note I discourage the use of this function with ALMP3_MP3STREAMs since in anyway you'll have to use almp3_get_mp3stream_buffer() to send data periodically.

Stop_Autopoll_mp3stream

procedure Stop_Autopoll_mp3stream
( mp3: not null A_mp3stream );

References:

almp3.ads:298:15 (declaration)
almp3.ads:444:23 (body)
See almp3_stop_autopoll_mp3().

Get_mp3stream_Buffer

function Get_mp3stream_Buffer
( mp3: not null A_mp3stream )
return Address;

References:

almp3.ads:308:14 (declaration)
almp3.ads:445:23 (body)
If the return value is not NULL, it will return a buffer that you'll have to fill with 'buffer_data_len' (from create_mp3stream) bytes MAX of new data. You will need to use free_mp3stream_buffer() when you are finished with it. return values: NULL if it doesn't need any data yet. Else the buffer to be filled.

Free_mp3stream_Buffer

procedure Free_mp3stream_Buffer
( mp3: not null A_mp3stream;
bytes_used: Integer );

References:

almp3.ads:317:15 (declaration)
almp3.ads:446:23 (body)
Use whenever you are finished with the buffer returned by almp3_get_mp3stream_buffer(). If 'bytes_used' is -1 it will use the full buffer and that will mean this is not the last block of data, else if 'bytes_used' is a number, it will indicate that this is the last buffer and the number of bytes to use from that last block. Once this buffer has been played and processed, almp3_poll_mp3_stream() will return ALMP3_POLL_JUSTFINISHED.

Get_Length_Frames_mp3stream

function Get_Length_Frames_mp3stream
( mp3: not null A_mp3stream;
total_size: Natural )
return Natural;

References:

almp3.ads:322:14 (declaration)
almp3.ads:447:23 (body)
Returns the ALMP3_MP3STREAM length either in frames, msecs or secs. You will have to pass in 'total_size' the total size (in bytes) of the mp3.

Get_Length_Secs_mp3stream

function Get_Length_Secs_mp3stream
( mp3: not null A_mp3stream;
total_size: Natural )
return Natural;

References:

almp3.ads:323:14 (declaration)
almp3.ads:448:23 (body)

Get_Length_Msecs_mp3stream

function Get_Length_Msecs_mp3stream
( mp3: not null A_mp3stream;
total_size: Natural )
return Natural;

References:

almp3.ads:324:14 (declaration)
almp3.ads:449:23 (body)

Get_Length_Bytes_mp3stream

function Get_Length_Bytes_mp3stream
( mp3: not null A_mp3stream;
total_size: Natural )
return Natural;

References:

almp3.ads:325:14 (declaration)
almp3.ads:450:23 (body)

Get_Pos_Frames_mp3stream

function Get_Pos_Frames_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:328:14 (declaration)
almp3.ads:451:23 (body)
See their ALMP3_MP3 equals.

Get_Pos_Msecs_mp3stream

function Get_Pos_Msecs_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:329:14 (declaration)
almp3.ads:452:23 (body)

Get_Pos_Secs_mp3stream

function Get_Pos_Secs_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:330:14 (declaration)
almp3.ads:453:23 (body)

Get_Pos_Bytes_mp3stream

function Get_Pos_Bytes_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:331:14 (declaration)
almp3.ads:454:23 (body)

Get_Msecs_Per_Frame_mp3stream

function Get_Msecs_Per_Frame_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:332:14 (declaration)
almp3.ads:455:23 (body)

Get_Bitrate_mp3stream

function Get_Bitrate_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:333:14 (declaration)
almp3.ads:456:23 (body)

Get_Layer_mp3stream

function Get_Layer_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:334:14 (declaration)
almp3.ads:457:23 (body)

Get_Is_Stereo_mp3stream

function Get_Is_Stereo_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:336:14 (declaration)
almp3.ads:458:23 (body)

Get_Wave_Bits_mp3stream

function Get_Wave_Bits_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:339:14 (declaration)
almp3.ads:459:23 (body)
Returns info about the wave.

Get_Wave_Is_Stereo_mp3stream

function Get_Wave_Is_Stereo_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:340:14 (declaration)
almp3.ads:460:23 (body)

Get_Wave_Freq_mp3stream

function Get_Wave_Freq_mp3stream
( mp3: not null A_mp3stream )
return Natural;

References:

almp3.ads:341:14 (declaration)
almp3.ads:461:23 (body)

Get_Output_Wave_mp3stream

function Get_Output_Wave_mp3stream
( mp3: not null A_mp3stream;
buffer_size: access Natural )
return Address;

References:

almp3.ads:353:14 (declaration)
almp3.ads:462:23 (body)
Returns a pointer to the piece of wave decoded after each poll, and the size of this buffer as well in 'buffer_size' (in bytes). Note this function will NOT automatically convert from unsinged to signed 16 bit data using the Allegro format instead of the standard format, so this data cannot be saved directly into a WAV for example without modifications. Also note in order for this function to work, the ALMP3_MP3STREAM needs to BE playing. return values: NULL if there is no wave being decoded.

Is_Playing_mp3stream

function Is_Playing_mp3stream
( mp3: not null A_mp3stream )
return Integer;

References:

almp3.ads:358:14 (declaration)
almp3.ads:463:23 (body)
Returns TRUE if the ALMP3_MP3STREAM is currently being played or FALSE if it is not.

Get_Audiostream_mp3stream

function Get_Audiostream_mp3stream
( mp3: not null A_mp3stream )
return A_Audiostream;

References:

almp3.ads:364:14 (declaration)
almp3.ads:464:23 (body)
Returns the allegro AUDIOSTREAM currently being used by the ALMP3_MP3STREAM. Note that when the ALMP3_MP3STREAM isn't being played most probably it will return NULL.

Seek_Abs_Frames_mp3stream

function Seek_Abs_Frames_mp3stream
( mp3: not null A_mp3stream;
frame, total_size: Natural )
return Natural;

References:

almp3.ads:374:14 (declaration)
almp3.ads:465:23 (body)
Returns the position in bytes where you should position your stream (file, memory buffer, socket) to continue playing at that mp3 position using an absolute (from start position) seeking. You need to pass the total size (in bytes) of the stream. special note: This function doesn't perform any operation or change but informs you where to read your next chunk of data.

Seek_Abs_Msecs_mp3stream

function Seek_Abs_Msecs_mp3stream
( mp3: not null A_mp3stream;
msecs, total_size: Natural )
return Natural;

References:

almp3.ads:375:14 (declaration)
almp3.ads:466:23 (body)

Seek_Abs_Secs_mp3stream

function Seek_Abs_Secs_mp3stream
( mp3: not null A_mp3stream;
msecs, total_size: Natural )
return Natural;

References:

almp3.ads:376:14 (declaration)
almp3.ads:467:23 (body)

Seek_Abs_Bytes_mp3stream

function Seek_Abs_Bytes_mp3stream
( mp3: not null A_mp3stream;
bytes, total_size: Natural )
return Natural;

References:

almp3.ads:377:14 (declaration)
almp3.ads:468:23 (body)

Seek_Rel_Frames_mp3stream

function Seek_Rel_Frames_mp3stream
( mp3: not null A_mp3stream;
frame, total_size: Natural )
return Natural;

References:

almp3.ads:387:14 (declaration)
almp3.ads:469:23 (body)
Returns the position in bytes where you should position your stream (file, memory buffer, socket) to continue playing at that mp3 position (using a relative, from current position, seeking). You need to pass the total size (in bytes) of the stream. special note: This function doesn't perform any operation or change but informs you where to read your next chunk of data.

Seek_Rel_Msecs_mp3stream

function Seek_Rel_Msecs_mp3stream
( mp3: not null A_mp3stream;
msec, total_size: Natural )
return Natural;

References:

almp3.ads:388:14 (declaration)
almp3.ads:470:23 (body)

Seek_Rel_Secs_mp3stream

function Seek_Rel_Secs_mp3stream
( mp3: not null A_mp3stream;
sec, total_size: Natural )
return Natural;

References:

almp3.ads:389:14 (declaration)
almp3.ads:471:23 (body)

Seek_Rel_Bytes_mp3stream

function Seek_Rel_Bytes_mp3stream
( mp3: not null A_mp3stream;
bytes, total_size: Natural )
return Natural;

References:

almp3.ads:390:14 (declaration)
almp3.ads:472:23 (body)