Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

esidplay.cpp File Reference

Implements a simple text shell SidPlayer using the real libsidplay::dll library. More...

#include "audiodrv_er6.h"
#include <e32test.h>
#include <stdio.h>
#include <stdlib.h>
#include "player.h"
#include "myendian.h"
#include "6510_.h"

Include dependency graph for esidplay.cpp:

Include dependency graph

Go to the source code of this file.

Compounds

class  CConsoleReader
 this class reads characters asyncronously from the console. More...


Enumerations

enum  { ERR_NOT_ENOUGH_MEMORY, ERR_SYNTAX, ERR_ENDIANESS }

Functions

GLDEF_D RTest gTest (_L("esidplay"))
GLREF_C bool sidEmuInitializeSong (emuEngine &thisEmuEngine, sidTune &thisTune, uword songNumber)
TInt SidPlayerThread (TAny *)
 this is the Sid player idle thread.

void SidPlayExceptionHandler (TExcType aExc)
 our own exception handler to ease debugging

void printtext (int messageNum)
LOCAL_C void InitMainL (void)
 initialise the emulation engine and start the SID chip emulator

LOCAL_C void RunTestsL ()
 Run all the tests.

GLDEF_C TInt E32Main ()
 Main.

GLDEF_C TInt E32Dll (TDllReason)
 DLL entry point.


Variables

const TInt EXIT_ERROR_STATUS = (-1)
LOCAL_D emuEnginemyEmuEngine
LOCAL_D TInt16 * buffer
LOCAL_D audioDrivermyAudio
LOCAL_D sidTunemyTune
LOCAL_D int bufSize
LOCAL_D uword selectedSong = 0
const uword fragments = 16
const uword fragSizeBase = 12
bool verboseOutput = false


Detailed Description

Implements a simple text shell SidPlayer using the real libsidplay::dll library.

Can be replaced by the Eikon version with a better UI. Based on sidplay.cpp by Michael Scwendt from the original SidPlay

Copyright (c) 2000-2002 Alfred E. Heggestad

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Definition in file esidplay.cpp.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
ERR_NOT_ENOUGH_MEMORY 
ERR_SYNTAX 
ERR_ENDIANESS 

Definition at line 118 of file esidplay.cpp.


Function Documentation

GLDEF_C TInt E32Dll TDllReason   ) 
 

DLL entry point.

Definition at line 785 of file esidplay.cpp.

GLDEF_C TInt E32Main  ) 
 

Main.

Definition at line 734 of file esidplay.cpp.

References gTest(), and RunTestsL().

GLDEF_D RTest gTest _L("esidplay")   ) 
 

Referenced by E32Main(), InitMainL(), printtext(), CConsoleReader::RunL(), SidPlayerThread(), and SidPlayExceptionHandler().

LOCAL_C void InitMainL void   ) 
 

initialise the emulation engine and start the SID chip emulator

Definition at line 274 of file esidplay.cpp.

References emuConfig::autoPanning, emuConfig::bitsPerSample, buffer, bufSize, emuConfig::channels, audioDriver::ConstructL(), sidTuneInfo::currentSong, ELOG1, ELOG3, emu_version, emuConfig::emulateFilter, epoc_version, ERR_ENDIANESS, ERR_NOT_ENOUGH_MEMORY, ERR_SYNTAX, EXIT_ERROR_STATUS, fragments, fragSizeBase, emuConfig::frequency, audioDriver::GetBlockSize(), emuEngine::getConfig(), audioDriver::GetErrorString(), audioDriver::GetFragments(), audioDriver::GetFrequency(), sidTune::getInfo(), audioDriver::GetSampleEncoding(), audioDriver::GetSamplePrecision(), gTest(), sidTuneInfo::infoString, sidTuneInfo::initAddr, audioDriver::IsThere(), sidTuneInfo::loadAddr, emuConfig::memoryMode, MPU_BANK_SWITCHING, MPU_PLAYSID_ENVIRONMENT, MPU_TRANSPARENT_ROM, myAudio, myEmuEngine, myTune, sidTuneInfo::numberOfInfoStrings, audioDriver::Open(), sidTuneInfo::playAddr, printtext(), SAMPLE_FREQ, emuConfig::sampleFormat, selectedSong, emuEngine::setConfig(), SIDEMU_16BIT, SIDEMU_8BIT, SIDEMU_FULLPANNING, SIDEMU_MONO, SIDEMU_NONE, SIDEMU_STEREO, sidEmuInitializeSong(), SidPlayerThread(), SidPlayExceptionHandler(), sidTuneInfo::songs, sidTuneInfo::speedString, sidTuneInfo::startSong, sidTuneInfo::statusString, udword, uword, verboseOutput, emuEngine::verifyEndianess(), and emuConfig::volumeControl.

Referenced by RunTestsL().

void printtext int  messageNum  ) 
 

Definition at line 684 of file esidplay.cpp.

References ERR_ENDIANESS, ERR_NOT_ENOUGH_MEMORY, ERR_SYNTAX, EXIT_ERROR_STATUS, and gTest().

LOCAL_C void RunTestsL  ) 
 

Run all the tests.

Definition at line 725 of file esidplay.cpp.

References InitMainL().

Referenced by E32Main().

GLREF_C bool sidEmuInitializeSong emuEngine thisEmuEngine,
sidTune thisTune,
uword  songNumber
 

Definition at line 28 of file player.cpp.

TInt SidPlayerThread TAny *  aPlayer  ) 
 

this is the Sid player idle thread.

Definition at line 54 of file esidplay.cpp.

References buffer, bufSize, ELOG2, emuEngine::FillBuffer(), gTest(), audioDriver::iBlocksInQueue, audioDriver::iIsReady, audioDriver::iPrefilled, myAudio, myEmuEngine, myTune, audioDriver::Play(), and ubyte.

Referenced by InitMainL(), and CSidPlayer::Play().

void SidPlayExceptionHandler TExcType  aExc  ) 
 

our own exception handler to ease debugging

Definition at line 89 of file esidplay.cpp.

References buffer, ELOG2, gTest(), myAudio, myEmuEngine, and myTune.

Referenced by InitMainL().


Variable Documentation

LOCAL_D TInt16* buffer
 

Definition at line 35 of file esidplay.cpp.

Referenced by Mixer::fill16bitMono(), Mixer::fill16bitMonoControl(), Mixer::fill16bitsplit(), Mixer::fill16bitStereo(), Mixer::fill16bitStereoControl(), Mixer::fill16bitStereoSurround(), Mixer::fill8bitMono(), Mixer::fill8bitMonoControl(), Mixer::fill8bitsplit(), Mixer::fill8bitStereo(), Mixer::fill8bitStereoControl(), Mixer::fill8bitStereoSurround(), emuEngine::FillBuffer(), Mixer::fillFunc(), sidTune::getSidtuneFromFileBuffer(), InitMainL(), main(), sidTune::PSID_fileSupport(), sidEmu::sidEmuFillBuffer(), SidPlayerThread(), and SidPlayExceptionHandler().

LOCAL_D int bufSize
 

Definition at line 38 of file esidplay.cpp.

Referenced by InitMainL(), main(), and SidPlayerThread().

const TInt EXIT_ERROR_STATUS = (-1)
 

Definition at line 29 of file esidplay.cpp.

const uword fragments = 16
 

Definition at line 43 of file esidplay.cpp.

Referenced by audioDriver::GetFragments(), CSidPlayer::InitL(), InitMainL(), and main().

const uword fragSizeBase = 12
 

Definition at line 44 of file esidplay.cpp.

Referenced by CSidPlayer::InitL(), InitMainL(), and main().

LOCAL_D audioDriver* myAudio
 

Definition at line 36 of file esidplay.cpp.

Referenced by InitMainL(), main(), CConsoleReader::RunL(), SidPlayerThread(), and SidPlayExceptionHandler().

LOCAL_D emuEngine* myEmuEngine
 

Definition at line 34 of file esidplay.cpp.

Referenced by InitMainL(), main(), CConsoleReader::RunL(), SidPlayerThread(), and SidPlayExceptionHandler().

LOCAL_D sidTune* myTune
 

Definition at line 37 of file esidplay.cpp.

Referenced by InitMainL(), main(), CConsoleReader::RunL(), SidPlayerThread(), and SidPlayExceptionHandler().

LOCAL_D uword selectedSong = 0
 

Definition at line 39 of file esidplay.cpp.

Referenced by CSidPlayer::InitL(), InitMainL(), main(), CConsoleReader::RunL(), and sidTune::selectSong().

bool verboseOutput = false [static]
 

Definition at line 127 of file esidplay.cpp.

Referenced by InitMainL().


Generated on Tue Feb 8 04:19:15 2005 for Esidplay by doxygen 1.3.3