mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
Add SFC_GET_LOOP_INFO and SF_LOOP_INFO struct.
This commit is contained in:
parent
24e06336be
commit
9e20edb51e
@ -171,6 +171,8 @@ enum
|
||||
SFC_GET_INSTRUMENT = 0x10D0,
|
||||
SFC_SET_INSTRUMENT = 0x10D1,
|
||||
|
||||
SFC_GET_LOOP_INFO = 0x10E0,
|
||||
|
||||
/* Following commands for testing only. */
|
||||
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
|
||||
|
||||
@ -236,7 +238,7 @@ enum
|
||||
typedef struct SNDFILE_tag SNDFILE ;
|
||||
|
||||
/* The following typedef is system specific and is defined when libsndfile is.
|
||||
** compiled. sf_count_t can be one of loff_t (Linux), off_t (*BSD),
|
||||
** compiled. sf_count_t can be one of loff_t (Linux), off_t (*BSD),
|
||||
** off64_t (Solaris), __int64_t (Win32) etc.
|
||||
*/
|
||||
|
||||
@ -327,6 +329,25 @@ enum
|
||||
SF_LOOP_BACKWARD
|
||||
} ;
|
||||
|
||||
/* Struct used to retrieve loop information from a file.*/
|
||||
typedef struct
|
||||
{
|
||||
short time_sig_num ; /* any positive integer >0 */
|
||||
short time_sig_den ; /* any positive power of 2 >0 */
|
||||
int loop_mode ; /* see SF_LOOP enum */
|
||||
|
||||
int num_beats ; /* this is NOT the amount of quarter notes !!!*/
|
||||
/* a full bar of 4/4 is 4 beats */
|
||||
/* a full bar of 7/8 is 7 beats */
|
||||
|
||||
float bpm ; /* suggestion, as it can be calculated using other fields:*/
|
||||
/* file's lenght, file's sampleRate and our time_sig_den*/
|
||||
/* -> bpms are always the amount of _quarter notes_ per minute */
|
||||
|
||||
int root_key ; /* MIDI note, or -1 for None */
|
||||
int future [6] ;
|
||||
} SF_LOOP_INFO ;
|
||||
|
||||
/* Open the specified file for read, write or both. On error, this will
|
||||
** return a NULL pointer. To find the error number, pass a NULL SNDFILE
|
||||
** to sf_perror () or sf_error_str ().
|
||||
|
Loading…
Reference in New Issue
Block a user