zenilib: zenilib/jni/external/openal-soft/examples/alstream.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions | Variables
alstream.c File Reference
`#include <string.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <signal.h>`
`#include <assert.h>`
`#include "AL/al.h"`
`#include "AL/alc.h"`
`#include "AL/alext.h"`
`#include "common/alhelpers.h"`
`#include "common/alffmpeg.h"`

Go to the source code of this file.

## Macros

#define | BUFFER_SIZE 8192
#define | NUM_BUFFERS 4

## Typedefs

typedef struct StreamPlayer | StreamPlayer

## Functions

static void | ClosePlayerFile (StreamPlayer *player)
static void | DeletePlayer (StreamPlayer *player)
int | main (int argc, char **argv)
static StreamPlayer * | NewPlayer (void)
static int | OpenPlayerFile (StreamPlayer *player, const char *filename)
static int | StartPlayer (StreamPlayer *player)
static int | UpdatePlayer (StreamPlayer *player)

## Variables

LPALBUFFERSAMPLESSOFT | alBufferSamplesSOFT = wrap_BufferSamples
LPALISBUFFERFORMATSUPPORTEDSOFT | alIsBufferFormatSupportedSOFT = NULL

## Macro Definition Documentation

#define BUFFER_SIZE 8192

Definition at line 49 of file alstream.c.

Referenced by OpenPlayerFile().

#define NUM_BUFFERS 4

Definition at line 48 of file alstream.c.

Referenced by DeletePlayer(), NewPlayer(), PSPAUD_OpenDevice(), PSPAUD_PlayDevice(), and StartPlayer().

## Typedef Documentation

typedef struct StreamPlayer StreamPlayer

## Function Documentation

static void ClosePlayerFile | ( | StreamPlayer * | player | ) |

static

Definition at line 178 of file alstream.c.

References closeAVFile(), free, and NULL.

Referenced by DeletePlayer(), main(), and OpenPlayerFile().

static void DeletePlayer | ( | StreamPlayer * | player | ) |

static

Definition at line 110 of file alstream.c.

References AL_NO_ERROR, alDeleteBuffers(), alDeleteSources(), alGetError(), ClosePlayerFile(), free, memset, and NUM_BUFFERS.

Referenced by main().

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 289 of file alstream.c.

References alBufferSamplesSOFT, alGetProcAddress(), alIsBufferFormatSupportedSOFT, alIsExtensionPresent(), ChannelsName(), CloseAL(), ClosePlayerFile(), DeletePlayer(), i, InitAL(), NewPlayer(), NULL, OpenPlayerFile(), Sleep, StartPlayer(), TypeName(), and UpdatePlayer().

static StreamPlayer * NewPlayer | ( | void |  | ) |

static

Definition at line 82 of file alstream.c.

References AL_NO_ERROR, AL_POSITION, AL_ROLLOFF_FACTOR, AL_SOURCE_RELATIVE, AL_TRUE, alGenBuffers(), alGenSources(), alGetError(), alSource3i(), alSourcei(), assert, malloc, memset, NULL, and NUM_BUFFERS.

Referenced by main().

static int OpenPlayerFile | ( | StreamPlayer * | player,
|  | const char * | filename
| ) |  |

static

Definition at line 126 of file alstream.c.

References alIsBufferFormatSupportedSOFT, BUFFER_SIZE, ChannelsName(), closeAVFile(), ClosePlayerFile(), error, FramesToBytes(), getAVAudioInfo(), getAVAudioStream(), GetFormat(), malloc, NULL, openAVFile(), and TypeName().

Referenced by main().

static int StartPlayer | ( | StreamPlayer * | player | ) |

static

Definition at line 191 of file alstream.c.

References AL_BUFFER, AL_NO_ERROR, alBufferSamplesSOFT, alGetError(), alSourcei(), alSourcePlay(), alSourceQueueBuffers(), alSourceRewind(), BytesToFrames(), i, NUM_BUFFERS, and readAVAudioData().

Referenced by main().

static int UpdatePlayer | ( | StreamPlayer * | player | ) |

static

Definition at line 228 of file alstream.c.

References AL_BUFFERS_PROCESSED, AL_BUFFERS_QUEUED, AL_NO_ERROR, AL_PAUSED, AL_PLAYING, AL_SOURCE_STATE, alBufferSamplesSOFT, alGetError(), alGetSourcei(), alSourcePlay(), alSourceQueueBuffers(), alSourceUnqueueBuffers(), BytesToFrames(), and readAVAudioData().

Referenced by main().

## Variable Documentation

LPALBUFFERSAMPLESSOFT alBufferSamplesSOFT = wrap_BufferSamples

Definition at line 41 of file alstream.c.

LPALISBUFFERFORMATSUPPORTEDSOFT alIsBufferFormatSupportedSOFT = NULL

Definition at line 42 of file alstream.c.