gcc 2.95 fixes

audioOutput_osx.c, aac_decode.c, mp4_decode.c have NOT been thoroughly
checked, but I nevertheless managed to eyeball and fix one
incompatibility in audioOutput_osx.c

All other files have been build successfully with gcc 2.95


git-svn-id: https://svn.musicpd.org/mpd/trunk@3688 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2005-11-19 10:29:20 +00:00
parent 4b00c62587
commit e8a54efe41
5 changed files with 9 additions and 6 deletions

View File

@ -70,10 +70,11 @@ static void freeAlsaData(AlsaData * ad) {
static int alsa_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
BlockParam * bp = NULL;
AlsaData * ad;
if(param) bp = getBlockParam(param, "device");
AlsaData * ad = newAlsaData();
ad = newAlsaData();
audioOutput->data = ad;

View File

@ -187,6 +187,7 @@ static int mvp_setPcmParams(MvpData *md, unsigned long rate, int channels, int b
static int mvp_openDevice(AudioOutput * audioOutput)
{
int ret = -1;
long long int stc = 0;
MvpData * md = audioOutput->data;
AudioFormat * audioFormat = &audioOutput->outAudioFormat;
int mix[5] = { 0, 2, 7, 1, 0 };
@ -208,7 +209,6 @@ static int mvp_openDevice(AudioOutput * audioOutput)
ERROR("Error setting audio format: %s\n", strerror(errno));
return -1;
}
long long int stc = 0;
ioctl(md->fd, MVP_SET_AUD_STC, &stc);
if (ioctl(md->fd, MVP_SET_AUD_BYPASS, 1) < 0){
ERROR("Error setting audio streamtype: %s\n", strerror(errno));

View File

@ -319,10 +319,11 @@ static int oss_testDefault() {
static int oss_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
BlockParam * bp = NULL;
OssData * od;
if(param) bp = getBlockParam(param, "device");
OssData * od = newOssData();
od = newOssData();
audioOutput->data = od;
if(!bp) {

View File

@ -291,8 +291,9 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
//DEBUG("osx_play: enter\n");
if(!od->started) {
int err;
od->started = 1;
int err = AudioOutputUnitStart(od->au);
err = AudioOutputUnitStart(od->au);
if(err) {
ERROR("unable to start audio output: %i\n", err);
return -1;

View File

@ -145,9 +145,9 @@ int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af) {
int waitOnDecode(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
int * decodeWaitedOn)
{
MpdTag * tag = NULL;
strncpy(pc->currentUrl, pc->utf8url, MAXPATHLEN);
pc->currentUrl[MAXPATHLEN] = '\0';
MpdTag * tag = NULL;
while(decode_pid>0 && dc->start) my_usleep(10000);