Read sound format parameters

=> R0 = 0
R1 = filename (or zero for currently open file)
R2 = pointer to 24-byte word-aligned block to return data

<= registers preserved
block updated:

+0 = format
+4 = frame rate
+8 = sample range data (2 words)
+16 = auxiliary paramater
+20 = length of sample in frames



The information returned is basically the same as PlayIt_Open in auto-detect mode, except that the number of frames is also returned and the operation is passive so doesn't affect any currently playing sample. The data returned is exactly as if PlayIt_Open was used so see that SWI for further information. The number of frames is the same as returned by PlayIt_SampleInfo (which requires the file to be open).



Note that the playing time of the whole file in seconds is simply the number of frames divided by the frame rate (ie block!20/block!4).



The auxiliary parameter is generally not useful but can provide additional information about ADPCM blocks.



From v1.59, if an error occurs (format was not recognised) then the format will contain partial information that may be helpful. In particular it will be zero if the file was not recognised at all otherwise bits 23-31 (the file type) will be set appropriately indicating that though the file was recognised there was a problem with some aspect of the file.


[ Parent ] [ Manual root ]


Created by SHtoHTML v1.20