STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Enumerations | Functions
AudioPlayer.h File Reference
#include "main.h"
#include "usbd_audio.h"

Go to the source code of this file.

Data Structures

struct  AUDIO_OUT_BufferTypeDef
 

Macros

#define AUDIO_OUT_BUFFER_SIZE   2*AUDIO_TOTAL_BUF_SIZE
 

Enumerations

enum  BUFFER_StateTypeDef { BUFFER_OFFSET_NONE = 0, BUFFER_OFFSET_HALF, BUFFER_OFFSET_FULL }
 
enum  AUDIO_ErrorTypeDef { AUDIO_ERROR_NONE = 0, AUDIO_ERROR_IO, AUDIO_ERROR_EOF, AUDIO_ERROR_INVALID_VALUE }
 

Functions

AUDIO_ErrorTypeDef AUDIO_PLAYER_Init (int outSelection, int sampleFreq)
 Initializes Audio Interface. More...
 
AUDIO_ErrorTypeDef AUDIO_PLAYER_Start (void)
 Starts Audio streaming. More...
 
void AUDIO_PLAYER_Restart (void)
 
AUDIO_ErrorTypeDef AUDIO_PLAYER_Process (void)
 Manages Audio process. More...
 
AUDIO_ErrorTypeDef AUDIO_PLAYER_Stop (void)
 Stops Audio streaming. More...
 
int AUDIO_PLAYER_GetClock (void)
 
void AUDIO_PLAYER_ReleaseClock (int trig)
 
int AUDIO_PLAYER_GetBuffer (uint8_t **out_BufAddr)
 
void AUDIO_Player_CpyBuf (uint8_t *buf)
 Copy USB input buffer to SAI output buffer. More...
 
void AUDIO_Player_QueueBuf (uint8_t *buf, int len)
 Put the Network Audio samples into SAI output buffer. More...
 
int AUDIO_PLAYER_GetState (void)
 
void AUDIO_Player_IncHeartbeat (void)
 Increment the audio reception counter (heartbeat) More...
 
unsigned long AUDIO_Player_GetHeartbeat (void)
 Get the counter (heartbeat) if we have audio reception. More...
 
void AUDIO_Player_UDANTERestart (void)
 Restart and sync audio for Network Audio. More...
 

Macro Definition Documentation

#define AUDIO_OUT_BUFFER_SIZE   2*AUDIO_TOTAL_BUF_SIZE

Definition at line 17 of file AudioPlayer.h.

Enumeration Type Documentation

Enumerator
AUDIO_ERROR_NONE 
AUDIO_ERROR_IO 
AUDIO_ERROR_EOF 
AUDIO_ERROR_INVALID_VALUE 

Definition at line 34 of file AudioPlayer.h.

Enumerator
BUFFER_OFFSET_NONE 
BUFFER_OFFSET_HALF 
BUFFER_OFFSET_FULL 

Definition at line 20 of file AudioPlayer.h.

Function Documentation

void AUDIO_Player_CpyBuf ( uint8_t *  buf)

Copy USB input buffer to SAI output buffer.

Parameters
buf- pointer to the USB input samples
Return values
None

Definition at line 227 of file AudioPlayer.c.

int AUDIO_PLAYER_GetBuffer ( uint8_t **  out_BufAddr)

Definition at line 117 of file AudioPlayer.c.

int AUDIO_PLAYER_GetClock ( void  )

Definition at line 72 of file AudioPlayer.c.

unsigned long AUDIO_Player_GetHeartbeat ( void  )

Get the counter (heartbeat) if we have audio reception.

Parameters
None
Return values
ulong- the audio reception counter

Definition at line 353 of file AudioPlayer.c.

int AUDIO_PLAYER_GetState ( void  )

Definition at line 109 of file AudioPlayer.c.

void AUDIO_Player_IncHeartbeat ( void  )

Increment the audio reception counter (heartbeat)

Parameters
None
Return values
None

Definition at line 371 of file AudioPlayer.c.

AUDIO_ErrorTypeDef AUDIO_PLAYER_Init ( int  outSelection,
int  sampleFreq 
)

Initializes Audio Interface.

Parameters
None
Return values
Audioerror

Definition at line 128 of file AudioPlayer.c.

AUDIO_ErrorTypeDef AUDIO_PLAYER_Process ( void  )

Manages Audio process.

Parameters
None
Return values
Audioerror

Definition at line 180 of file AudioPlayer.c.

void AUDIO_Player_QueueBuf ( uint8_t *  buf,
int  len 
)

Put the Network Audio samples into SAI output buffer.

Parameters
buf- the pointer to the Audio Network samples
len- the length of the Audio Samples, in bytes
Return values
None

Definition at line 304 of file AudioPlayer.c.

void AUDIO_PLAYER_ReleaseClock ( int  trig)

Definition at line 97 of file AudioPlayer.c.

void AUDIO_PLAYER_Restart ( void  )

Definition at line 168 of file AudioPlayer.c.

AUDIO_ErrorTypeDef AUDIO_PLAYER_Start ( void  )

Starts Audio streaming.

Parameters
idxFile index
Return values
Audioerror

Definition at line 161 of file AudioPlayer.c.

AUDIO_ErrorTypeDef AUDIO_PLAYER_Stop ( void  )

Stops Audio streaming.

Parameters
None
Return values
Audioerror

Definition at line 190 of file AudioPlayer.c.

void AUDIO_Player_UDANTERestart ( void  )

Restart and sync audio for Network Audio.

Parameters
None
Return values
None

Definition at line 342 of file AudioPlayer.c.