-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocumentation.lisp
1052 lines (723 loc) · 25.3 KB
/
documentation.lisp
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
(in-package #:org.shirakumo.fraf.mpg123)
;; low-level.lisp
(docs:define-docs
(variable *here*
"Variable containing the path to this very file, hopefully.")
(variable *static*
"Variable containing a pathname to the static directory.")
)
;; conditions.lisp
(docs:define-docs
(function define-simple-condition
"Shorthand for DEFINE-CONDITION.
If the first argument in the body is a list, it is taken as the slots list.
Otherwise the arguments are the format string and arguments for the report.
In the report body, C is bound to the condition and S to the stream.")
(function define-direct-condition
"Expands to DEFINE-SIMPLE-CONDITION except automatically constructing slots for each access to C.
See DEFINE-SIMPLE-CONDITION")
(type mpg-error
"Condition superclass for all errors related to this library.")
(type unknown-id3v2-frame-type
"Condition signalled when an unknown id3v2 frame type name is requested from a metadata object.
See NAME
See METADATA
See MPG-ERROR")
(function name
"Returns the name of the erroneously requested id3v2 frame type.
See UNKNOWN-ID3v2-FRAME-TYPE")
(type error-string-error
"Condition superclass for all errors that include an error string from the underlying library.
See MPG-ERROR
See ERROR-CODE
See ERROR-STRING")
(function error-code
"Returns the CL-MPG123-CFFI:ERRORS error-code associated with the condition.
See ERROR-STRING-ERROR
See ERROR-STRING")
(function error-string
"Returns the string describing the error code associated with the condition.
See ERROR-STRING-ERROR")
(type generic-error
"A generic error class to be used in situations where no more specific class applies.
See FORM
See ERROR-STRING-ERROR")
(function form
"Returns he form that caused the generic error.
See GENERIC-ERROR")
(type init-failed
"Condition signalled in the case that the initialisation of the library fails.
See INIT
See ERROR-STRING-ERROR")
(type mpg-file-error
"Condition superclass for all errors that relate to a FILE object.
See FILE
See MPG-ERROR")
(function file
"Returns the file associated with the condition.
See FILE
See MPG-FILE-ERROR")
(type mpg-file-string-error
"Combination of MPG-FILE-ERROR and ERROR-STRING-ERROR.
See MPG-FILE-ERROR
See ERROR-STRING-ERROR")
(type handler-creation-failed
"Condition signalled when creating a new mpg handler object fails.
See MPG-FILE-STRING-ERROR")
(type not-connected
"Condition signalled when an attempt is made to use a function that requires the file object to be connected, but it isn't.
See MPG-FILE-ERROR")
(type connection-failed
"Condition signalled when connecting to/opening the underlying file fails.
See CONNECT
See MPG-FILE-STRING-ERROR
See PATH")
(type disconnection-failed
"Condition signalled when disconnecting from/closing the underlying file fails.
See DISCONNECT
See MPG-FILE-STRING-ERROR")
(type decoder-set-failed
"Condition signalled when changing the decoder of a file fails.
See VALUE
See (SETF DECODER)
See MPG-FILE-STRING-ERROR")
(function value
"Returns the value the function tried to set before the condition was signalled.")
(type read-failed
"Condition signalled when mpg123 fails to read into a buffer.
See BUFFER
See BUFFER-SIZE
See MPG-FILE-STRING-ERROR
See DIRECT-READ")
(function buffer
"Returns the pointer to the C char buffer.")
(function buffer-size
"Returns the size of the buffer in bytes.")
(function decode-failed
"Condition signalled when mpg123 fails to decode a buffer into another.
See IN-BUFFER
See OUT-BUFFER
See IN-SIZE
See OUT-SIZE
See DECODE
See MPG-FILE-STRING-ERROR")
(function in-buffer
"Returns the pointer to the C char buffer used for input on decoding.")
(function out-buffer
"Returns the pointer to the C char buffer used for output on decoding.")
(function in-size
"Returns the size of the input buffer in bytes.")
(function out-size
"Returns the size of the output buffer in bytes.")
(type frame-decode-failed
"Condition signalled when mpg123 fails to decode a frame.
See MPG-FILE-STRING-ERROR
See DECODE-FRAME")
(type query-failed
"Generic condition signalled when the querying for a value failed.
See QUERY
See MPG-FILE-ERROR
See GENERIC-ERROR")
(function query
"The function that performed the query that failed.")
(type seek-failed
"Condition signalled when a seek to a different position in the file failed.
See BY
See MODE
See SEEK-POSITION
See MPG-FILE-ERROR
See SEEK")
(function by
"Returns the way by which the seek was performed.
Must be one of :SAMPLE :FRAME :SECOND
See SEEK-FAILED")
(function mode
"Returns the mode by which the seek was performed.
Must be one of :ABSOLUTE :RELATIVE :FROM-END
See SEEK-FAILED")
(function seek-position
"Returns the position to which the seek was performed.
See SEEK-FAILED")
(type equalizer-query-failed
"Condition signalled when querying for an equalizer band value failed.
See BAND
See CHANNEL
See MPG-FILE-ERROR
See EQUALIZER")
(function band
"Returns the band that was attempted to be accessed.")
(function channel
"Returns the channel that was attempted to be accessed.")
(type equalizer-set-failed
"Condition signalled when setting an equalizer band value failed.
See BAND
See CHANNEL
See MPG-FILE-STRING-ERROR
See (SETF EQUALIZER)")
(type equalizer-reset-failed
"Condition signalled when resetting the equalizer failed.
See MPG-FILE-STRING_ERROR
See RESET-EQUALIZER")
(type volume-query-failed
"Condition signalled when querying for the current volume failed.
See MPG-FILE-STRING-ERROR
See VOLUME")
(type volume-set-failed
"Condition signalled when setting the current volume failed.
See MPG-FILE-STRING-ERROR
See (SETF VOLUME)
See RELATIVE
See VALUE")
(function relative
"Returns whether the volume was attempted to be adjusted relatively or absolutely.")
(type scan-failed
"Condition signalled when scanning the file for metadata failed.
See MPG-FILE-STRING-ERROR
See SCAN")
(type id3-query-failed
"Condition signalled when retrieving the ID3 metadata failed.
See MPG-FILE-STRING-ERROR
See METADATA"))
;; id3-data.lisp
(docs:define-docs
(variable *id3v1-genre-list*
"A list of genres that the ID3V1 genre index references. Includes WinAmp extensions.
See https://de.wikipedia.org/wiki/Liste_der_ID3v1-Genres")
(function id3v1-genre
"Returns the name of the corresponding genre of the integer as defined by id3v1.")
(function id3v2-genre
"Parses the ID3V2 genre string into a list of genres.
More specifically, it handles ID3V1 references, of which there can be multiple.")
(variable *id3v2-type-map*
"A map of id3v2 frame type name to human-readable names.
See http://id3.org/d3v2.3.0")
(function id3v2-type
"Returns the id3v2 frame type keyword for the passed equivalent human-readable name."))
;; metadata.lisp
(docs:define-docs
(type metadata
"Class container for ID3 metadata.
When re/initialising this, you should pass the ID3V1/2 struct pointers as
the respective initargs. Note that ID3V1 and ID3V2 values will coexist, but
ID3V2 values should always come before ID3V1 values in the resulting fields
list. Also note that duplicate (by EQUAL) entries are not stored.
Note that when the metadata is reinitialised, all fields and pictures are
cleared out first, before potentially being repopulated by the passed args.
Note that ID3V1 text values are by default parsed by UTF-8 first and by
ISO-8859-1 if that fails. See DIRECT-STR. You can override the UTF-8 default
by specifying the :ID3V1-ENCODING initarg.
See METADATA
See VERSION
See FIELDS
See PICTURES
See FIELD
See FIELD-TEXT")
(function version
"The version of the ID3 metadata.
Can be either \"1.0\" \"1.1\" \"2.3\" or \"2.4\".
See METADATA")
(function fields
"Returns the list of fields stored in the metadata.
Each entry in the list is of the following form:
ENTRY ::= (TYPE LANG DESCRIPTION TEXT)
TYPE --- A keyword corresponding to the id3v2 frame type name.
LANG --- A three-letter language string or NIL if no language was given.
DESCRIPTION --- A string describing the field or NIL if no description was given.
TEXT --- The actual text content. Can also be an integer in cases where
the data type was known (year, track number).
Note that fields that can potentially contain multiple values of the same type
will be split into multiple instances of the same field. For example, a TPE1
frame with text \"FOO/BAR\" gets split into two TPE1 entries, one with FOO as
text and one with BAR.
See METADATA
See FIELD
See FIELD-TEXT")
(function pictures
"Returns the list of pictures stored in the metadata.
See PICTURE
See METADATA")
(function field
"Gathers all fields matching the requested type into a list.
The field type is excluded, so each match is a list of three values:
language, description, and text.
On an unknown ID3V2 frame type name, an error is signalled.
See METADATA
See FIELDS
See ID3V2-TYPE")
(function field-text
"Returns all text values of the matching fields as multiple values.
This is mostly for convenience when you only care about one or more text
values of a field.
See FIELD")
(type picture
"Container class for a picture encapsulated in an ID3 tag.
The data is copied over to a lisp (unsigned-byte 8) vector, so the picture
data will stay fresh even if the source file or id3 data is freed.
See KIND
See DESCRIPTION
See MIME-TYPE
See DATA")
(function kind
"Returns the picture type.
Can be one of:
:OTHER :ICON :OTHER-ICON :FRONT-COVER :BACK-COVER :LEAFLET :MEDIA :LEAD
:ARTIST :CONDUCTOR :ORCHESTRA :COMPOSER :LYRICIST :LOCATION :RECORDING
:PERFORMANCE :VIDEO :FISH :ILLUSTRATION :ARTIST-LOGO :PUBLISHER-LOGO
See PICTURE")
(function description
"Returns the picture description string.
See PICTURE")
(function mime-type
"Returns the picture data's mime-type as a string.
See PICTURE")
(function data
"Returns the actual picture data as an octet-vector.
You are responsible for converting or interpreting the data as needed.
See PICTURE."))
;; toolkit.lisp
(docs:define-docs
(function with-foreign-values
"Same as CFFI:WITH-FOREIGN-OBJECTS except resolving the bindings at the end and returning them as multiple values.")
(function with-value-args
"Same as CFFI:WITH-FOREIGN-OBJECTS except that after CALL the bindings contain the resolved values.")
(function with-error
"Handle a form that returns a CL-MPG123-CFFI:ERRORS enum value.")
(function with-generic-error
"Simple variant of WITH-ERROR that signals a generic variant.
Uses of this should be replaced by more explicit condition signals later.")
(function with-negative-error
"Handle a form that errors when its result is negative.")
(function with-zero-error
"Handle a form that errors when its result is zero.")
(function string-nil
"When the argument is NIL or an empty string, return NIL, otherwise return the argument.")
(function direct-str
"Translate the string pointed to by POINTER into a string of max LENGTH.
If the translated string is empty, NIL is returned.
At first the string is attempted to be decoded by the specified ENCODING. If this
fails, it is instead decoded by ISO-8859-1.")
(function mstring
"Translates an CL-MPG123-CFFI:MSTRING struct or pointer to such a struct to a string.
If the translated string is empty, NIL is returned.")
(function split
"Splits the string on each occurrence of char, dropping empty substrings."))
;; wrapper.lisp
(docs:define-docs
(variable *print-object-path-limit*
"Sets the amount of characters printed of the path of the FILE during PRINT-OBJECT.
See FILE")
(variable *init*
"Stores whether CL-MPG123-CFFI:INIT has been called or not.")
(function init
"Prepares the underlying library if not already done so.")
(function exit
"Cleans up the underlying library if not already done so.")
(function encode-encodings
"Encodes the list of encodings as a single integer by ORing their values together.")
(function encode-channels
"Encodes the list of channels as a single integer by ORing their values together.")
(function decode-flags
"Decodes the flags integer into a list of flag enum keywords.")
(function dispose-handle
"Cleans up the handle and deallocates it.")
(function make-file
"Create a new file object pointing to the given path.
See FILE")
(type file
"Container class for a file.
Manages all the decoding information so that it is easily accessible.
Also takes care of managing the underlying C values so that you don't
have to worry about garbage collection or buffer allocation and so forth.
It also takes care of setting up the desired decoding parameters and flags.
The slots of the file are not settable, however you can reconfigure the
file at any point using REINITIALIZE-INSTANCE. Note that this will have
to DISCONNECT the file and delete its handle first. It will reCONNECT
if it was previously connected, but you cannot do this if you are in the
middle of processing data or need to otherwise preserve state.
You can find more information about most of the properties that can be set
via initargs in the mpg123.h mpg123_params and mpg123_param_flags enums.
See https://www.mpg123.de/api/group__mpg123__init.shtml#ga73a8ff3363028b89afc72b3ea032b9cb
See HANDLE
See CONNECTED
See SCANNED
See BUFFER
See RATE
See CHANNELS
See ENCODING
See PATH
See DECODER
See ACCEPTED-FORMAT
See BUFFER-SIZE
See FORCE-RATE
See DOWN-SAMPLE
See RVA
See DOWNSPEED
See UPSPEED
See START-FRAME
See DECODE-FRAMES
See OUTSCALE
See INDEX-SIZE
See PREFRAMES
See FORCE-CHANNELS
See FORCE-8BIT
See GAPLESS
See FUZZY-SEEK
See FORCE-FLOAT
See SKIP-ID3V2
See IGNORE-INFOFRAME
See AUTO-RESAMPLE
See PICTURES
See CONNECT
See DISCONNECT
See READ-DIRECTLY
See PROCESS
See PROCESS-TO-VECTOR
See PROCESS-INTO-VECTOR
See DECODE
See DECODE-FRAME
See SAMPLE-POSITION
See FRAME-POSITION
See STREAM-POSITION
See SEEK
See TIME-FRAME-INDEX
See EQUALIZER
See RESET-EQUALIZER
See VOLUME
See INFO
See FILE-FORMAT
See SCAN
See FRAME-COUNT
See SAMPLE-COUNT
See FRAME-SECONDS
See FRAME-SAMPLES
See TRACK-LENGTH
See METADATA")
(function handle
"Returns the CL-MPG123-CFFI:HANDLE pointer of the file.
See FILE")
(function connected
"Returns whether the file has been connected to the file or not.
Before being connected most queries or actions against the file will
fail.
See FILE
See CONNECT")
(function scanned
"Returns whether the file has been scanned for metadata.
Before being scanned, some queries will return inaccurate results
or might not be able to return any data at all, in which case they will
initiate a scan themselves automatically.
See FILE
See SCAN")
(function buffer
"Returns a pointer to the C char buffer that is used to store decoded data.
This might be NIL if the buffer-size is NIL.
See FILE
See BUFFER-SIZE")
(function rate
"Returns the rate in Hertz that the decoded file is in.
This is NIL until the file is connected.
See FILE
See CONNECT
See FILE-FORMAT")
(function channels
"Returns the number of channels the decoded file has.
This is NIL until the file is connected.
See FILE
See CONNECT
See FILE-FORMAT")
(function encoding
"Returns the encoding the file is in.
This is NIL until the file is connected.
See FILE
See CONNECT
See FILE-FORMAT")
(function path
"Returns the pathname of the file being accessed.
See FILE
See CONNECT")
(function decoder
"The decoder driver to use as backend.
See SUPPORTED-DECODERS for a list of decoders that can be used as a backend.
This is SETFable.
See FILE
See DECODER-SET-FAILED")
(function accepted-format
"Returns the accepted format for the decoder.
This can be NIL for none, T for all, or a list of three values:
(RATE CHANNELS ENCODINGS) where RATE is the accepted rate in Hertz,
CHANNELS is one of :left :right :left-right, and ENCODINGS is a list of
allowed data encodings, each value being one of:
:int8 :uint8 :int16 :uint16 :int24 :uint24
:int32 :uint32 :ulaw-8 :alaw-8 :float :double
This can be set via the :accepted-format initarg.
See FILE
See CL-MPG123-CFFI:ENC")
(function buffer-size
"Returns the size of the internal buffer used to store decoded data.
This can be NIL for no buffer, T for automatic size, or an integer specifying
the number of bytes to use. The automatic size is picked by
CL-MPG123-CFFI:OUTBLOCK.
This can be set via the :buffer-size initarg.
See FILE
See BUFFER")
(function force-rate
"Returns, if forced, the rate at which output is produced.
This can be set via the :force-rate initarg.
See FILE")
(function down-sample
"Returns the downsampling approach being used.
Can be one of NIL :NATIVE :HALF-RATE :QUARTER-RATE.
This can be set via the :down-sample initarg.
See FILE")
(function rva
"Returns the RVA mode being used.
Can be one of NIL :OFF :MIX :ALBUM.
This can be set via the :down-sample initarg.
See FILE")
(function downspeed
"Returns the number of times a frame will be played.
This can be set via the :downspeed initarg.
See FILE")
(function upspeed
"Returns the number of frames between two played frames.
This can be set via the :upspeed initarg.
See FILE")
(function start-frame
"Returns the index of the starting frame. Frames before this are not played.
This can be set via the :start-frame initarg.
See FILE")
(function decode-frames
"Returns the number of frames that are decoded or T for all.
This can be set via the :decode-frames initarg.
See FILE")
(function outscale
"Returns the output sample amplitude scale.
This can be set via the :outscale initarg.
See FILE")
(function index-size
"Returns the frame index size.
Can be NIL for default, T for dynamic growth, or an integer for
specific size (positive) or growth rate (negative).
This can be set via the :index-size initarg.
See FILE")
(function preframes
"Returns how many frames to decode or ignore in advance for layer 3.
This can be set via the :preframes initarg.
See FILE")
(function force-channels
"Returns, if at all, which channels are forced.
Can be one of NIL :mono-right :mono-left :mono-mix :stereo.
This can be set via the :force-channels initarg.
See FILE")
(function force-8bit
"Returns whether to force 8bit formats.
This can be set via the :force-8bit initarg.
See FILE")
(function gapless
"Returns whether to use gapless decoding.
This can be set via the :gapless initarg.
See FILE")
(function fuzzy-seek
"Returns whether to allow approximate seeking by guessing.
This can be set via the :fuzzy-seek initarg.
See FILE")
(function force-float
"Returns whether to force floating-point output.
This can be set via the :force-float initarg.
See FILE")
(function skip-id3v2
"Returns whether to skip the ID3V2 tag information.
This can be set via the :skip-id3v2 initarg.
See FILE")
(function ignore-infoframe
"Returns whether to ignore LAME/Xing info frames and treat them as normal MPEG data.
This can be set via the :ignore-infoframe initarg.
See FILE")
(function auto-resample
"Returns whether to automatic internal resampling of any kind.
This can be set via the :auto-resample initarg.
See FILE")
(function parse-pictures
"Returns whether ID3V2 APIC tags should be parsed.
This can be set via the :parse-pictures initarg.
See FILE")
(function check-connected
"Checks whether the file is connected or not. If not, an error is signalled.
See FILE
See CONNECTED
See NOT-CONNECTED")
(function connect
"Connects the file to the underlying file on the filesystem.
This will trigger parsing of several pieces of information within
the file and open the path to querying the file for properties.
Naturally it will also allow actually decoding the file.
See FILE
See CONNECTED
See CONNECTION-FAILED")
(function disconnect
"Disconnects the file from the underlying file on the filesystem.
This will free up the file descriptor. And prevent you from decoding
any more data until the file is connected again.
See FILE
See CONNECTED
See DISCONNECTION-FAILED")
(function read-directly
"Decodes data from the file and stores it in BUFFER, reading at most BUFFER-SIZE bytes.
Returns the number of bytes that were stored in the buffer.
See FILE
See PROCESS
See READ-FAILED")
(function process
"Decodes data from the file into the internal buffer.
Note that this will fail grossly if the file's buffer-size / buffer is NIL.
Returns the number of bytes read. See BUFFER for the pointer to the C buffer
where the actual data is stored.
See READ-DIRECTLY
See BUFFER
See BUFFER-SIZE")
(function process-to-vector
"Decodes data from the file into a new (unsigned-byte 8) vector.
The returned vector will have the exact length fitting to the amount of
data decoded.
See PROCESS")
(function process-into-vector
"Decodes data from the file into the given octet-vector.
Returns the number of bytes read.
At most (min (length vector) (buffer-size file)) bytes are read.
See PROCESS")
(function decode-directly
"Decodes data from the given input array pointer to the given output array pointer.
Returns the number of bytes decoded.
See FILE
See DECODE-FAILED")
(function decode
"Decodes data from the given input vector to the given output vector.
Returns the number of bytes decoded.
See DECODE-DIRECTLY")
(function decode-frame
"Decodes the next frame into the library's internal buffer.
This does not store it into the file buffer! BUFFER will not have
changed!
See FILE
See FRAME-DECODE-FAILED")
(function sample-position
"Returns the current position as a sample index.
See FILE")
(function frame-position
"Returns the current position as a frame index.
See FILE")
(function stream-position
"Returns the current position in stream as a byte index.
See FILE")
(function seek
"Seek in the frame.
MODE can be one of :ABSOLUTE :RELATIVE :FROM-END which decides
whether the given position should be absolute, relative to the
current position, or from the end, respectively.
BY can be one of :SAMPLE :FRAME :SECOND which decides whether
seeking should be by the sample, frame, or track seconds index.
Returns the new position as sample, frame, or track seconds index
respectively.
See FILE
See SEEK-FAILED")
(function time-frame-index
"Returns the frame index of a given track seconds index.
See FILE")
(function equalizer
"Accesses the equalizer value for the given channel and band.
Channel must be within [0,31].
This is SETFable.
See EQUALIZER-QUERY-FAILED
See EQUALIZER-SET-FAILED
See FILE")
(function reset-equalizer
"Resets the equalizer to its initial values. Which is to say it disables it.
See EQUALIZER-RESET-FAILED
See FILE")
(function volume
"Accesses the volume of the file.
Returned are three values: the base volume, the actual volume including
potential changes by RVA, and the RVA adjustment made. The volumes are
linear factors, and the RVA adjustment is in decibel.
This is SETFable. On SETF, an additional keyword argument :relative
is supported, which says whether to adjust volume relatively to the
current value, or absolutely.
See VOLUME-QUERY-FAILED
See VOLUME-SET-FAILED
See FILE")
(function info
"Returns various information about the current frame.
Returned is a plist with the following fields:
:VERSION The MPEG version, 1.0/2.0/2.5
:LAYER The MPEG layer, 1/2/3
:RATE The sample rate in Hertz
:MODE The channel mode
:MODE-EXT The mode extension bit flag
:FLAGS A list of frame flags
:EMPHASIS The emphasis type
:BITRATE The bitrate in kbps
:ABR-RATE The target average bitrate
:VBR The VBR mode
See FILE")
(function file-format
"Returns information about the file's actual format.
Returned are three values, the rate in Hertz, the channels, and
the encoding used.
See RATE
See CHANNELS
See ENCODING
See FILE")
(function scan
"Scans the file for information.
This is only done if a scan has not already been performed.
See SCANNED
See FILE
See SCAN-FAILED")
(function frame-count
"Returns the number of frames in the file.
Performs a SCAN if necessary.
See FILE
See SCAN")
(function sample-count
"Returns the number of samples in the file.
Performs a SCAN if necessary.
See FILE
See SCAN")
(function frame-seconds
"Returns the number of seconds a frame encompasses.
Performs a SCAN if necessary.