Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

vs1001k.h File Reference

Network interface controller definitions. More...

#include <sys/types.h>

Go to the source code of this file.

Functions

int VsPlayerInit (void)
 Initialize the VS1001 hardware interface.

int VsPlayerReset (u_short mode)
 Software reset the decoder.

int VsPlayerKick (void)
 Start playback.

u_charVsBufferInit (u_short size)
 Initialize the MP3 data buffer.

u_charVsBufferReset (void)
 Reset all MP3 data buffer pointers.

u_charVsBufferRequest (u_short *sizep)
 Request MP3 data buffer space.

u_charVsBufferAcknowledge (u_short nbytes)
 Acknowledge filled buffer space.

int VsSetVolume (u_char left, u_char right)
 Set volume.

int VsBeep (u_char fsin, u_char ms)
 Sine wave beep.


Detailed Description

Network interface controller definitions.


Function Documentation

int VsBeep u_char    fsin,
u_char    ms
 

Sine wave beep.

Parameters:
fsin  Frequency.
ms  Duration.
Returns:
0 on success, -1 otherwise.

u_char* VsBufferAcknowledge u_short    nbytes
 

Acknowledge filled buffer space.

Returns:
Pointer to the next write position.

u_char* VsBufferInit u_short    size
 

Initialize the MP3 data buffer.

Parameters:
size  Number of bytes to allocate for the data buffer. Should be at least 4k. If this parameter is 0, all available memory minus 8k are allocated.
Returns:
Pointer to the data buffer or null on failures.

u_char* VsBufferRequest u_short   sizep
 

Request MP3 data buffer space.

Returns:
Pointer to the next write position.

u_char* VsBufferReset void   
 

Reset all MP3 data buffer pointers.

Returns:
Pointer to the data buffer.

int VsPlayerInit void   
 

Initialize the VS1001 hardware interface.

Returns:
0 on success, -1 otherwise.

int VsPlayerKick void   
 

Start playback.

This routine will send the first MP3 data bytes to the decoder, until it is completely filled. The data buffer should have been filled with at least about 6k of data before calling this routine.

If called for the first time, the routine will register the interrupt handler.

If the decoder is activated, 1024 nulls are sent first.

Returns:
0 on success, -1 otherwise.

int VsPlayerReset u_short    mode
 

Software reset the decoder.

This function is typically called after VsPlayerInit().

Parameters:
mode  Any of the following flags may be or'ed
  • VS_SM_DIFF
  • VS_SM_FFWD
  • VS_SM_RESET
  • VS_SM_MP12
  • VS_SM_PDOWN
  • VS_SM_DAC
  • VS_SM_DACMONO
  • VS_SM_BASS
  • VS_SM_DACT
  • VS_SM_BYTEORD
  • VS_SM_IBMODE
  • VS_SM_IBCLK
Returns:
0 on success, -1 otherwise.

int VsSetVolume u_char    left,
u_char    right
 

Set volume.

Parameters:
left  Left channel volume.
right  Right channel volume.
Returns:
0 on success, -1 otherwise.


Generated on Thu Jan 30 22:30:55 2003 for EduNet by doxygen1.2.18