XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
sound.cpp File Reference
#include <Sound\sound.h>
#include <_null.h>
#include <Mm\kmalloc.h>
#include <Mm\pmmngr.h>
#include <Mm\vmmngr.h>
#include <fs\vfs.h>
#include <fs\dev\devfs.h>
#include <aurora.h>
#include <serv\sysserv.h>
#include <string.h>
#include <aucon.h>
#include <Hal\serial.h>
#include <Hal\x86_64_hal.h>
Include dependency graph for sound.cpp:

Macros

#define SOUND_REGISTER_SNDPLR   100
 
#define SOUND_START_OUTPUT   102
 
#define SOUND_STOP_OUTPUT   103
 
#define SOUND_START_INPUT   104
 
#define SOUND_STOP_INPUT   105
 
#define SOUND_SET_VOLUME   106
 
#define SOUND_GET_VOLUME   107
 
#define SOUND_MUTE_ENABLE   108
 
#define SOUND_MUTE_DISABLE   109
 
#define SOUND_READ_AVAIL   110
 
#define SOUND_UNREGISTER_SNDPLR   111
 
#define SND_BUFF_SZ   PAGE_SIZE
 

Functions

void AuSoundAddDSP (AuDSP *dsp)
 
void AuRemoveDSP (AuDSP *dsp)
 
AuDSPAuSoundGetDSP (uint16_t id)
 
void AuSoundGetBlock (uint64_t *buffer)
 
size_t AuSoundRead (AuVFSNode *fsys, AuVFSNode *file, uint64_t *buffer, uint32_t length)
 
size_t AuSoundWrite (AuVFSNode *fsys, AuVFSNode *file, uint64_t *buffer, uint32_t length)
 
void AuSoundSetCard (AuSound *dev)
 
void AuSoundStart ()
 
void AuSoundStop ()
 
int AuSoundIOControl (AuVFSNode *node, int code, void *arg)
 
void AuSoundInitialise ()
 
void AuSoundRemoveDSP (uint16_t id)
 

Variables

AuSound_Registered_dev
 
AuDSPdsp_first
 
AuDSPdsp_last
 
uint8_tmixbuf
 
bool _audio_started_
 
bool _audio_stopped_
 

Macro Definition Documentation

◆ SND_BUFF_SZ

#define SND_BUFF_SZ   PAGE_SIZE

◆ SOUND_GET_VOLUME

#define SOUND_GET_VOLUME   107

◆ SOUND_MUTE_DISABLE

#define SOUND_MUTE_DISABLE   109

◆ SOUND_MUTE_ENABLE

#define SOUND_MUTE_ENABLE   108

◆ SOUND_READ_AVAIL

#define SOUND_READ_AVAIL   110

◆ SOUND_REGISTER_SNDPLR

#define SOUND_REGISTER_SNDPLR   100

◆ SOUND_SET_VOLUME

#define SOUND_SET_VOLUME   106

◆ SOUND_START_INPUT

#define SOUND_START_INPUT   104

◆ SOUND_START_OUTPUT

#define SOUND_START_OUTPUT   102

◆ SOUND_STOP_INPUT

#define SOUND_STOP_INPUT   105

◆ SOUND_STOP_OUTPUT

#define SOUND_STOP_OUTPUT   103

◆ SOUND_UNREGISTER_SNDPLR

#define SOUND_UNREGISTER_SNDPLR   111

Function Documentation

◆ AuRemoveDSP()

void AuRemoveDSP ( AuDSP dsp)

◆ AuSoundAddDSP()

void AuSoundAddDSP ( AuDSP dsp)

◆ AuSoundGetBlock()

void AuSoundGetBlock ( uint64_t buffer)

◆ AuSoundGetDSP()

AuDSP * AuSoundGetDSP ( uint16_t  id)

◆ AuSoundInitialise()

void AuSoundInitialise ( )

◆ AuSoundIOControl()

int AuSoundIOControl ( AuVFSNode node,
int  code,
void *  arg 
)

◆ AuSoundRead()

size_t AuSoundRead ( AuVFSNode fsys,
AuVFSNode file,
uint64_t buffer,
uint32_t  length 
)

◆ AuSoundRemoveDSP()

void AuSoundRemoveDSP ( uint16_t  id)

◆ AuSoundSetCard()

void AuSoundSetCard ( AuSound dev)

◆ AuSoundStart()

void AuSoundStart ( )

◆ AuSoundStop()

void AuSoundStop ( )

◆ AuSoundWrite()

size_t AuSoundWrite ( AuVFSNode fsys,
AuVFSNode file,
uint64_t buffer,
uint32_t  length 
)

Variable Documentation

◆ _audio_started_

bool _audio_started_

◆ _audio_stopped_

bool _audio_stopped_

◆ _Registered_dev

AuSound* _Registered_dev

BSD 2-Clause License

Copyright (c) 2021, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ dsp_first

AuDSP* dsp_first

◆ dsp_last

AuDSP* dsp_last

◆ mixbuf

uint8_t* mixbuf