#ifndef _PPLS_H_
#define _PPLS_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef struct tagPLSITEM
{
  int type ;
  wchar_t *filename ; 
  wchar_t *title ;
  wchar_t *memo ;
  int song ;

  long time_in_ms ;
  long loop_in_ms ;
  long fade_in_ms ;

  int loop_num ;

  int enable_vol[4] ;
  int vol[4] ;

  int extra_code ;
  int opll_ch_pan ;

} PLSITEM ;

PLSITEM *PLSITEM_new(wchar_t *text) ;
void PLSITEM_delete(PLSITEM *elem) ;
wchar_t *PLSITEM_print(PLSITEM *elem, wchar_t *buf, wchar_t *plsfile) ;
void PLSITEM_adjust(PLSITEM *elem, int play_time, int fade_time, int loop_num, int vol[4]) ;
void PLSITEM_set_title(PLSITEM *elem, const wchar_t *title) ;

int PPLS_get_time(wchar_t *text, int d) ;

#define PLSITEM_PRINT_SIZE (_MAX_PATH*2+1024)

#ifdef __cplusplus
}
#endif

#endif
