From 667ae9fef1b14d1db3bf57a2b307e78faa9a89fd Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 3 Sep 2008 21:39:17 +0000 Subject: [PATCH] - DirectFB -> libdirect updates from git Changed files: FusionSound-git.patch -> 1.1 --- FusionSound-git.patch | 11024 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 11024 insertions(+) create mode 100644 FusionSound-git.patch diff --git a/FusionSound-git.patch b/FusionSound-git.patch new file mode 100644 index 0000000..a0f5503 --- /dev/null +++ b/FusionSound-git.patch @@ -0,0 +1,11024 @@ +From: Denis Oliver Kropp +Date: Thu, 28 Feb 2008 13:56:34 +0000 (+0100) +Subject: [fusionsound] Follow API changes, removing remaining dependencies on . +X-Git-Url: http://git.directfb.org/?p=core%2FFusionSound.git;a=commitdiff_plain;h=3195b24014b5678b934db021a6958fcae9c09bb9 + +[fusionsound] Follow API changes, removing remaining dependencies on . +--- + +diff --git a/drivers/alsa.c b/drivers/alsa.c +index 6b685d7..53c35a8 100644 +--- a/drivers/alsa.c ++++ b/drivers/alsa.c +@@ -108,7 +108,7 @@ alsa_device_get_devname( const CoreSoundDeviceConfig *config ) + return "default"; + } + +-static DFBResult ++static DirectResult + alsa_device_set_configuration( snd_pcm_t *handle, + CoreSoundDeviceConfig *config ) + { +@@ -124,7 +124,7 @@ alsa_device_set_configuration( snd_pcm_t *handle, + + if (snd_pcm_hw_params_any( handle, params ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't get hw params!\n" ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (snd_pcm_hw_params_set_access( handle, params, +@@ -133,19 +133,19 @@ alsa_device_set_configuration( snd_pcm_t *handle, + : SND_PCM_ACCESS_RW_INTERLEAVED ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set interleaved %saccess!\n", + fs_config->dma ? "DMA " : "" ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (snd_pcm_hw_params_set_format( handle, params, + fs2alsa_format( config->format ) ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set format!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + if (snd_pcm_hw_params_set_channels( handle, params, + FS_CHANNELS_FOR_MODE(config->mode) ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set channels mode!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + #if SND_LIB_VERSION >= 0x010009 +@@ -157,14 +157,14 @@ alsa_device_set_configuration( snd_pcm_t *handle, + if (snd_pcm_hw_params_set_rate_near( handle, params, + &config->rate, &dir ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set rate!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + dir = 0; + if (snd_pcm_hw_params_set_buffer_time_near( handle, params, + &buffertime, &dir ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set buffertime!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + dir = 1; +@@ -172,12 +172,12 @@ alsa_device_set_configuration( snd_pcm_t *handle, + if (snd_pcm_hw_params_set_periods_near( handle, params, + &periods, &dir ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set period count!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + if (snd_pcm_hw_params( handle, params ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't set hw params!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* Workaround for ALSA >= 1.0.9 always returning the maximum supported buffersize. */ +@@ -191,37 +191,37 @@ alsa_device_set_configuration( snd_pcm_t *handle, + + if (snd_pcm_prepare( handle ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't prepare stream!\n" ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + alsa_device_getset_volume( float *get, float *set ) + { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + snd_mixer_t *mixer; + snd_mixer_selem_id_t *sid; + snd_mixer_elem_t *elem; + long vol, min, max; + + if (snd_mixer_open( &mixer, 0 ) < 0) +- return DFB_IO; ++ return DR_IO; + + if (snd_mixer_attach( mixer, fs_config->device ? : "default" ) < 0) { + snd_mixer_close( mixer ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (snd_mixer_selem_register( mixer, NULL, NULL ) < 0) { + snd_mixer_close( mixer ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (snd_mixer_load( mixer ) < 0) { + snd_mixer_close( mixer ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + snd_mixer_selem_id_malloc( &sid ); +@@ -230,7 +230,7 @@ alsa_device_getset_volume( float *get, float *set ) + elem = snd_mixer_find_selem( mixer, sid ); + if (!elem) { + snd_mixer_close( mixer ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + snd_mixer_selem_get_playback_volume_range( elem, &min, &max ); +@@ -239,12 +239,12 @@ alsa_device_getset_volume( float *get, float *set ) + vol = *set * (float)(max - min) + min; + + if (snd_mixer_selem_set_playback_volume_all( elem, vol ) < 0) +- ret = DFB_UNSUPPORTED; ++ ret = DR_UNSUPPORTED; + } + else { + /* Assume equal level for all channels */ + if (snd_mixer_selem_get_playback_volume( elem, 0, &vol ) < 0) +- ret = DFB_UNSUPPORTED; ++ ret = DR_UNSUPPORTED; + else + *get = (float)(vol - min) / (float)(max - min); + } +@@ -257,7 +257,7 @@ alsa_device_getset_volume( float *get, float *set ) + /******************************************************************************/ + + +-static DFBResult ++static DirectResult + device_probe( void ) + { + snd_pcm_t *handle; +@@ -265,10 +265,10 @@ device_probe( void ) + if (snd_pcm_open( &handle, fs_config->device ? : "default", + SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) == 0) { + snd_pcm_close( handle ); +- return DFB_OK; ++ return DR_OK; + } + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + static void +@@ -296,7 +296,7 @@ device_get_driver_info( SoundDriverInfo *info ) + info->device_data_size = sizeof(AlsaDeviceData); + } + +-static DFBResult ++static DirectResult + device_open( void *device_data, + SoundDeviceInfo *device_info, + CoreSoundDeviceConfig *config ) +@@ -305,18 +305,18 @@ device_open( void *device_data, + const char *dev; + snd_ctl_t *ctl; + snd_ctl_card_info_t *info; +- DFBResult ret; ++ DirectResult ret; + + dev = fs_config->device ? : alsa_device_get_devname( config ); + + if (snd_pcm_open( &data->handle, dev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't open pcm device '%s'!\n", dev ); +- return DFB_IO; ++ return DR_IO; + } + + if (snd_pcm_nonblock( data->handle, 0 ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't disable non-blocking mode!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + /* device name */ +@@ -357,7 +357,7 @@ device_open( void *device_data, + D_INFO( "FusionSound/Device/ALSA: DMA enabled.\n" ); + } + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -382,7 +382,7 @@ try_recover( snd_pcm_t *handle, int err ) + return err; + } + +-static DFBResult ++static DirectResult + device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + { + AlsaDeviceData *data = device_data; +@@ -403,7 +403,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + if (r < 0) { + D_ERROR( "FusionSound/Device/ALSA: snd_pcm_avail_update() failed: %s\n", + snd_strerror( r ) ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + continue; + } +@@ -417,7 +417,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + if (r < 0) { + D_ERROR( "FusionSound/Device/ALSA: snd_pcm_avail_update() failed: %s\n", + snd_strerror( r ) ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + continue; + } +@@ -429,7 +429,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + if (r < 0) { + D_ERROR( "FusionSound/Device/ALSA: snd_pcm_mmap_begin() failed: %s\n", + snd_strerror( r ) ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + continue; + } +@@ -441,10 +441,10 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + } + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_commit_buffer( void *device_data, unsigned int frames ) + { + AlsaDeviceData *data = device_data; +@@ -460,7 +460,7 @@ device_commit_buffer( void *device_data, unsigned int frames ) + if (r < 0) { + D_ERROR( "FusionSound/Device/ALSA: snd_pcm_writei() failed: %s\n", + snd_strerror( r ) ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + } + frames -= r; +@@ -475,7 +475,7 @@ device_commit_buffer( void *device_data, unsigned int frames ) + if (r < 0) { + D_ERROR( "FusionSound/Device/ALSA: snd_pcm_mmap_commit() failed: %s\n", + snd_strerror( r ) ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + continue; + } +@@ -483,7 +483,7 @@ device_commit_buffer( void *device_data, unsigned int frames ) + } + } + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -496,19 +496,19 @@ device_get_output_delay( void *device_data, int *delay ) + *delay = odelay; + } + +-static DFBResult ++static DirectResult + device_get_volume( void *device_data, float *level ) + { + return alsa_device_getset_volume( level, NULL ); + } + +-static DFBResult ++static DirectResult + device_set_volume( void *device_data, float level ) + { + return alsa_device_getset_volume( NULL, &level ); + } + +-static DFBResult ++static DirectResult + device_suspend( void *device_data ) + { + AlsaDeviceData *data = device_data; +@@ -517,21 +517,21 @@ device_suspend( void *device_data ) + snd_pcm_close( data->handle ); + data->handle = NULL; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_resume( void *device_data ) + { + AlsaDeviceData *data = device_data; + const char *dev; +- DFBResult ret; ++ DirectResult ret; + + dev = fs_config->device ? : alsa_device_get_devname( data->config ); + + if (snd_pcm_open( &data->handle, dev, SND_PCM_STREAM_PLAYBACK, 0 ) < 0) { + D_ERROR( "FusionSound/Device/Alsa: couldn't reopen pcm device '%s'!\n", dev ); +- return DFB_IO; ++ return DR_IO; + } + + ret = alsa_device_set_configuration( data->handle, data->config ); +diff --git a/drivers/oss.c b/drivers/oss.c +index 9e9ce8d..9b3b16e 100644 +--- a/drivers/oss.c ++++ b/drivers/oss.c +@@ -124,7 +124,7 @@ oss2fs_format( int format ) + return -1; + } + +-static DFBResult ++static DirectResult + oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config ) + { + int fmt; +@@ -137,7 +137,7 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config ) + + fmt = fs2oss_format( config->format ); + if (fmt == -1) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* set application profile */ + #if defined(SNDCTL_DSP_PROFILE) && defined(APF_NORMAL) +@@ -149,20 +149,20 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config ) + if (ioctl( fd, SNDCTL_DSP_SETFMT, &fmt ) < 0 || + oss2fs_format( fmt ) != config->format) { + D_ERROR( "FusionSound/Device/OSS: unsupported format!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* set number of channels */ + if (ioctl( fd, SNDCTL_DSP_CHANNELS, &channels ) < 0 || + channels != FS_CHANNELS_FOR_MODE(config->mode)) { + D_ERROR( "FusionSound/Device/OSS: unsupported channels mode!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* set sample rate */ + if (ioctl( fd, SNDCTL_DSP_SPEED, &rate ) < 0) { + D_ERROR( "FusionSound/Device/OSS: unable to set rate to '%d'!\n", config->rate ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* query block size */ +@@ -170,18 +170,18 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config ) + buffersize /= channels * FS_BYTES_PER_SAMPLE(config->format); + if (buffersize < 1) { + D_ERROR( "FusionSound/Device/OSS: unable to query block size!\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + config->rate = rate; + config->buffersize = buffersize; + +- return DFB_OK; ++ return DR_OK; + } + + /******************************************************************************/ + +-static DFBResult ++static DirectResult + device_probe( void ) + { + int fd, fmt; +@@ -195,17 +195,17 @@ device_probe( void ) + } + + if (fd < 0) +- return DFB_IO; ++ return DR_IO; + + /* issue a generic ioctl to test the device */ + if (ioctl( fd, SNDCTL_DSP_GETFMTS, &fmt ) < 0) { + close( fd ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + close( fd ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -233,7 +233,7 @@ device_get_driver_info( SoundDriverInfo *info ) + info->device_data_size = sizeof(OSSDeviceData); + } + +-static DFBResult ++static DirectResult + device_open( void *device_data, + SoundDeviceInfo *device_info, + CoreSoundDeviceConfig *config ) +@@ -241,7 +241,7 @@ device_open( void *device_data, + OSSDeviceData *data = device_data; + int mixer_fd; + audio_buf_info info; +- DFBResult ret; ++ DirectResult ret; + + /* open sound device in non-blocking mode */ + if (fs_config->device) { +@@ -254,7 +254,7 @@ device_open( void *device_data, + + if (data->fd < 0) { + D_ERROR( "FusionSound/Device/OSS: Couldn't open output device!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + /* reset to blocking mode */ +@@ -303,10 +303,10 @@ device_open( void *device_data, + close( mixer_fd ); + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + { + OSSDeviceData *data = device_data; +@@ -314,21 +314,21 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + *addr = data->buffer; + *avail = data->config->buffersize; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_commit_buffer( void *device_data, unsigned int frames ) + { + OSSDeviceData *data = device_data; + + if (write( data->fd, data->buffer, frames*data->bytes_per_frame ) < 0) { +- DFBResult ret = errno2result( errno ); ++ DirectResult ret = errno2result( errno ); + D_DERROR( ret, "FusionSound/Device/OSS: couldn't write %d frames!\n", frames ); + return ret; + } + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -346,7 +346,7 @@ device_get_output_delay( void *device_data, int *delay ) + *delay = (info.fragsize * info.fragstotal - info.bytes) / data->bytes_per_frame; + } + +-static DFBResult ++static DirectResult + device_get_volume( void *device_data, float *level ) + { + int fd; +@@ -354,22 +354,22 @@ device_get_volume( void *device_data, float *level ) + + fd = direct_try_open( "/dev/mixer", "/dev/sound/mixer", O_RDONLY, false ); + if (fd < 0) +- return DFB_IO; ++ return DR_IO; + + if (ioctl( fd, SOUND_MIXER_READ_PCM, &vol ) < 0) { + D_PERROR( "FusionSound/Device/OSS: couldn't get volume level!\n" ); + close( fd ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + close( fd ); + + *level = (float)((vol & 0xff) + ((vol >> 8) & 0xff)) / 200.0f; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_set_volume( void *device_data, float level ) + { + int fd; +@@ -377,22 +377,22 @@ device_set_volume( void *device_data, float level ) + + fd = direct_try_open( "/dev/mixer", "/dev/sound/mixer", O_RDONLY, false ); + if (fd < 0) +- return DFB_IO; ++ return DR_IO; + + vol = level * 100.0f; + vol |= vol << 8; + if (ioctl( fd, SOUND_MIXER_WRITE_PCM, &vol ) < 0) { + D_PERROR( "FusionSound/Device/OSS: couldn't set volume level!\n" ); + close( fd ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + close( fd ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_suspend( void *device_data ) + { + OSSDeviceData *data = device_data; +@@ -401,21 +401,21 @@ device_suspend( void *device_data ) + close( data->fd ); + data->fd = -1; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_resume( void *device_data ) + { + OSSDeviceData *data = device_data; +- DFBResult ret; ++ DirectResult ret; + + data->fd = (fs_config->device) + ? open( fs_config->device, O_WRONLY ) + : direct_try_open( "/dev/dsp", "/dev/sound/dsp", O_WRONLY, false ); + if (data->fd < 0) { + D_ERROR( "FusionSound/Device/OSS: Couldn't reopen output device!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + ret = oss_device_set_configuration( data->fd, data->config ); +@@ -427,7 +427,7 @@ device_resume( void *device_data ) + + fcntl( data->fd, F_SETFD, FD_CLOEXEC ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +diff --git a/drivers/wave.c b/drivers/wave.c +index f33a44d..a13514f 100644 +--- a/drivers/wave.c ++++ b/drivers/wave.c +@@ -85,7 +85,7 @@ typedef struct { + /******************************************************************************/ + + +-static DFBResult ++static DirectResult + device_probe( void ) + { + int fd; +@@ -93,7 +93,7 @@ device_probe( void ) + + /* load only when requested */ + if (!fs_config->driver) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (fs_config->device) { + snprintf( path, sizeof(path), "%s", fs_config->device ); +@@ -105,11 +105,11 @@ device_probe( void ) + + fd = open( path, O_WRONLY | O_CREAT | O_NOCTTY | O_NONBLOCK, 0644 ); + if (fd < 0) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + close( fd ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -137,7 +137,7 @@ device_get_driver_info( SoundDriverInfo *info ) + info->device_data_size = sizeof(WaveDeviceData); + } + +-static DFBResult ++static DirectResult + device_open( void *device_data, + SoundDeviceInfo *device_info, + CoreSoundDeviceConfig *config ) +@@ -147,7 +147,7 @@ device_open( void *device_data, + char path[4096]; + + if (config->format == FSSF_FLOAT) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (fs_config->device) { + snprintf( path, sizeof(path), "%s", fs_config->device ); +@@ -161,7 +161,7 @@ device_open( void *device_data, + if (data->fd < 0) { + D_ERROR( "FusionSound/Device/Wave: " + "couldn't open '%s' for writing!\n", path ); +- return DFB_IO; ++ return DR_IO; + } + + /* close file descriptor on exec */ +@@ -222,16 +222,16 @@ device_open( void *device_data, + + if (write( data->fd, &header, sizeof(header) ) < sizeof(header)) { + D_ERROR( "FusionSound/Device/Wave: write error!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + data->bits = FS_BITS_PER_SAMPLE(config->format); + data->channels = FS_CHANNELS_FOR_MODE(config->mode); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + { + WaveDeviceData *data = device_data; +@@ -239,10 +239,10 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail ) + *addr = data->buffer; + *avail = data->buffersize; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_commit_buffer( void *device_data, unsigned int frames ) + { + WaveDeviceData *data = device_data; +@@ -274,7 +274,7 @@ device_commit_buffer( void *device_data, unsigned int frames ) + + write( data->fd, buf, frames * data->channels * data->bits >> 3 ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -283,19 +283,19 @@ device_get_output_delay( void *device_data, int *delay ) + *delay = 0; + } + +-static DFBResult ++static DirectResult + device_get_volume( void *device_data, float *level ) + { +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + device_set_volume( void *device_data, float level ) + { +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + device_suspend( void *device_data ) + { + WaveDeviceData *data = device_data; +@@ -306,10 +306,10 @@ device_suspend( void *device_data ) + data->fd = -1; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + device_resume( void *device_data ) + { + WaveDeviceData *data = device_data; +@@ -327,13 +327,13 @@ device_resume( void *device_data ) + data->fd = open( path, O_WRONLY | O_APPEND | O_NOCTTY ); + if (data->fd < 0) { + D_ERROR( "FusionSound/Device/Wave: couldn't reopen '%s'!\n", path ); +- return DFB_IO; ++ return DR_IO; + } + + fcntl( data->fd, F_SETFD, FD_CLOEXEC ); + } + +- return DFB_OK; ++ return DR_OK; + } + + static void +diff --git a/examples/advanced.c b/examples/advanced.c +index d9fa898..d62ce46 100644 +--- a/examples/advanced.c ++++ b/examples/advanced.c +@@ -17,7 +17,7 @@ static IFusionSoundPlayback * + prepare_test( IFusionSoundBuffer *buffer, + const char *name ) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSoundPlayback *playback; + + ret = buffer->CreatePlayback (buffer, &playback); +@@ -48,7 +48,7 @@ prepare_test( IFusionSoundBuffer *buffer, + + #define TEST(x...) \ + do { \ +- DFBResult ret = (x); \ ++ DirectResult ret = (x); \ + if (ret) { \ + fprintf( stderr, "FAILED!\n\n" ); \ + FusionSoundError (#x, ret); \ +@@ -191,7 +191,7 @@ do_playback_tests (IFusionSoundBuffer *buffer) + + int main (int argc, char *argv[]) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *sound; + IFusionSoundBuffer *buffer; + +diff --git a/examples/loader.c b/examples/loader.c +index 373efcb..eb4b0ff 100644 +--- a/examples/loader.c ++++ b/examples/loader.c +@@ -43,27 +43,27 @@ static void fixup_sampledata(u16 *data, int len) + } + #endif + +-static DFBResult ++static DirectResult + read_file_header (int fd) + { + char buf[12]; + + if (read (fd, buf, 12) < 12) { + fprintf (stderr, "Could not read at least 12 bytes!\n"); +- return DFB_IO; ++ return DR_IO; + } + + if (buf[0] != 'R' || buf[1] != 'I' || buf[2] != 'F' || buf[3] != 'F') { + fprintf (stderr, "No RIFF header found!\n"); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + if (buf[8] != 'W' || buf[9] != 'A' || buf[10] != 'V' || buf[11] != 'E') { + fprintf (stderr, "Not a WAVE!\n"); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -85,7 +85,7 @@ read_chunk_header (int fd, char *magic) + IFusionSoundBuffer * + load_sample (IFusionSound *sound, const char *filename) + { +- DFBResult ret; ++ DirectResult ret; + int fd; + FSBufferDescription desc; + IFusionSoundBuffer *buffer; +@@ -104,7 +104,7 @@ load_sample (IFusionSound *sound, const char *filename) + return NULL; + } + +- while (DFB_TRUE) { ++ while (DR_TRUE) { + char magic[4]; + + len = read_chunk_header (fd, magic); +@@ -168,7 +168,7 @@ load_sample (IFusionSound *sound, const char *filename) + desc.sampleformat = (fmt.bitspersample == 8) ? FSSF_U8 : FSSF_S16; + desc.samplerate = fmt.frequency; + +- while (DFB_TRUE) { ++ while (DR_TRUE) { + char magic[4]; + + len = read_chunk_header (fd, magic); +diff --git a/examples/music.c b/examples/music.c +index 5656bfc..c30c462 100644 +--- a/examples/music.c ++++ b/examples/music.c +@@ -56,7 +56,7 @@ cleanup( int s ) + exit( s ); + } + +-static DFBEnumerationResult ++static DirectEnumerationResult + track_display_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + { + printf( " Track %2d: %s - %s\n", id, +@@ -66,10 +66,10 @@ track_display_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + return DFENUM_OK; + } + +-static DFBEnumerationResult ++static DirectEnumerationResult + track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + { +- DFBResult ret; ++ DirectResult ret; + FSMusicProviderStatus status = FMSTATE_UNKNOWN; + double len = 0; + static int flags = FMPLAY_NOFX; +@@ -220,7 +220,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + int + main( int argc, char *argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + + ret = FusionSoundInit( &argc, &argv ); + if (ret) +diff --git a/examples/music_loader.c b/examples/music_loader.c +index d97b5a4..76def1e 100644 +--- a/examples/music_loader.c ++++ b/examples/music_loader.c +@@ -22,7 +22,7 @@ load_sample( IFusionSound *sound, const char *file ) + void *data; + int bytes; + int frames = 0; +- DFBResult ret; ++ DirectResult ret; + + ret = sound->CreateMusicProvider( sound, file, &provider ); + if (ret) { +@@ -68,7 +68,7 @@ main( int argc, char **argv ) + { + IFusionSound *sound; + IFusionSoundBuffer *buffer; +- DFBResult ret; ++ DirectResult ret; + + ret = FusionSoundInit( &argc, &argv ); + if (ret) +diff --git a/examples/player.c b/examples/player.c +index 7fc065d..d622e4b 100644 +--- a/examples/player.c ++++ b/examples/player.c +@@ -26,10 +26,10 @@ static IFusionSoundPlayback *playback; + static int sample_length; + + +-static DFBResult ++static DirectResult + create_playback( const char *filename ) + { +- DFBResult ret; ++ DirectResult ret; + + ret = FusionSoundCreate( &sound ); + if (ret) { +@@ -53,13 +53,13 @@ create_playback( const char *filename ) + } + else { + playback->Start( playback, 0, -1 ); +- return DFB_OK; ++ return DR_OK; + } + } + + sound->Release( sound ); + +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + static void +@@ -101,17 +101,17 @@ slider_update( LiteSlider *slider, float pos, void *ctx ) + static void + button_pressed( LiteButton *button, void *ctx ) + { +- static DFBBoolean stopped; ++ static bool stopped; + + if (stopped) { + playback->Continue( playback ); + +- stopped = DFB_FALSE; ++ stopped = false; + } + else { + playback->Stop( playback ); + +- stopped = DFB_TRUE; ++ stopped = true; + } + } + +@@ -119,7 +119,7 @@ int + main (int argc, char *argv[]) + { + int i; +- DFBResult ret; ++ DirectResult ret; + LiteLabel *label[5]; + LiteSlider *slider[5]; + LiteButton *playbutton; +@@ -195,7 +195,7 @@ main (int argc, char *argv[]) + lite_set_window_opacity( window, 0xff ); + + /* run the event loop with a timeout */ +- while (lite_window_event_loop( window, 20 ) == DFB_TIMEOUT) { ++ while (lite_window_event_loop( window, 20 ) == DR_TIMEOUT) { + int position = 0; + + playback->GetStatus( playback, NULL, &position ); +diff --git a/examples/scope.c b/examples/scope.c +index d84d130..89f7f9d 100644 +--- a/examples/scope.c ++++ b/examples/scope.c +@@ -65,7 +65,7 @@ buffer_callback( int len, void *ctx ) + { + void *data; + +- if (buffer->Lock( buffer, &data, 0, 0 ) != DFB_OK) ++ if (buffer->Lock( buffer, &data, 0, 0 ) != DR_OK) + return FMBCR_OK; + + /* draw scope */ +@@ -79,21 +79,21 @@ buffer_callback( int len, void *ctx ) + return FMBCR_OK; + } + +-static DFBResult ++static DirectResult + create_playback( const char *filename ) + { + FSBufferDescription b_desc; + FSStreamDescription s_desc; +- DFBResult err; ++ DirectResult err; + + err = FusionSoundCreate( &sound ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + FusionSoundError( "FusionSoundCreate() failed", err ); + return err; + } + + err = sound->CreateMusicProvider( sound, filename, &provider ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + FusionSoundError( "CreateMusicProvider() failed", err ); + return err; + } +@@ -111,25 +111,25 @@ create_playback( const char *filename ) + s_desc.channels = 2; + + err = sound->CreateStream( sound, &s_desc, &stream ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + FusionSoundError( "CreateStream() failed", err ); + return err; + } + + err = sound->CreateBuffer( sound, &b_desc, &buffer ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + FusionSoundError( "CreateBuffer() failed", err ); + return err; + } + + err = provider->PlayToBuffer( provider, buffer, + buffer_callback, NULL ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + FusionSoundError( "PlayToBuffer() failed", err ); + return err; + } + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -148,11 +148,11 @@ destroy_playback( void ) + int + main( int argc, char **argv ) + { +- DFBResult err; ++ DirectResult err; + DFBRectangle rect; + + err = DirectFBInit( &argc, &argv ); +- if (err != DFB_OK) ++ if (err != DR_OK) + DirectFBErrorFatal( "DirectFBInit() failed", err ); + + if (argc != 2) { +@@ -161,7 +161,7 @@ main( int argc, char **argv ) + } + + err = FusionSoundInit( &argc, &argv ); +- if (err != DFB_OK) ++ if (err != DR_OK) + FusionSoundErrorFatal( "FusionSoundInit() failed", err ); + + /* initialize LiTE */ +@@ -184,7 +184,7 @@ main( int argc, char **argv ) + lite_set_window_opacity( window, 0xff ); + + /* initialize FusionSound and load track */ +- if (create_playback( argv[1] ) != DFB_OK) { ++ if (create_playback( argv[1] ) != DR_OK) { + destroy_playback(); + lite_destroy_window( window ); + lite_close(); +@@ -192,12 +192,12 @@ main( int argc, char **argv ) + } + + /* event loop */ +- while (lite_window_event_loop( window, 20 ) == DFB_TIMEOUT) { ++ while (lite_window_event_loop( window, 20 ) == DR_TIMEOUT) { + double pos; + + /* check if playback is finished */ + err = provider->GetPos( provider, &pos ); +- if (err == DFB_EOF) ++ if (err == DR_EOF) + break; + } + +diff --git a/examples/simple.c b/examples/simple.c +index add23aa..9992b96 100644 +--- a/examples/simple.c ++++ b/examples/simple.c +@@ -12,7 +12,7 @@ + + int main (int argc, char *argv[]) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *sound; + IFusionSoundBuffer *buffer; + +diff --git a/examples/stream.c b/examples/stream.c +index e4549c9..ed64c9d 100644 +--- a/examples/stream.c ++++ b/examples/stream.c +@@ -13,7 +13,7 @@ + static void + feed_stream (IFusionSoundStream *stream) + { +- DFBResult ret; ++ DirectResult ret; + int i; + s16 buf[16384]; + +@@ -49,7 +49,7 @@ feed_stream (IFusionSoundStream *stream) + int + main (int argc, char *argv[]) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *sound; + IFusionSoundStream *stream; + FSStreamDescription desc; +diff --git a/include/fusionsound.h b/include/fusionsound.h +index 26f97de..1bb94d2 100644 +--- a/include/fusionsound.h ++++ b/include/fusionsound.h +@@ -28,7 +28,7 @@ + #ifndef __FUSIONSOUND_H__ + #define __FUSIONSOUND_H__ + +-#include ++#include + + #ifdef __cplusplus + extern "C" +@@ -81,50 +81,50 @@ DECLARE_INTERFACE( IFusionSoundMusicProvider ) + * Parses the command-line and initializes some variables. You absolutely need to + * call this before doing anything else. Removes all options used by FusionSound from argv. + */ +-DFBResult FusionSoundInit( +- int *argc, /* pointer to main()'s argc */ +- char *(*argv[]) /* pointer to main()'s argv */ +- ); ++DirectResult FusionSoundInit( ++ int *argc, /* pointer to main()'s argc */ ++ char *(*argv[]) /* pointer to main()'s argv */ ++ ); + + /* + * Sets configuration parameters supported on command line and in config file. + * Can only be called before FusionSoundCreate but after FusionSoundInit. + */ +-DFBResult FusionSoundSetOption( +- const char *name, +- const char *value +- ); ++DirectResult FusionSoundSetOption( ++ const char *name, ++ const char *value ++ ); + + /* + * Creates the super interface. + */ +-DFBResult FusionSoundCreate( +- IFusionSound **ret_interface /* pointer to the created interface */ +- ); ++DirectResult FusionSoundCreate( ++ IFusionSound **ret_interface /* pointer to the created interface */ ++ ); + + /* + * Print a description of the result code along with an + * optional message that is put in front with a colon. + */ +-DFBResult FusionSoundError( +- const char *msg, /* optional message */ +- DFBResult result /* result code to interpret */ +- ); ++DirectResult FusionSoundError( ++ const char *msg, /* optional message */ ++ DirectResult result /* result code to interpret */ ++ ); + + /* + * Behaves like FusionSoundError, but shuts down the calling application. + */ +-DFBResult FusionSoundErrorFatal( +- const char *msg, /* optional message */ +- DFBResult result /* result code to interpret */ +- ); ++DirectResult FusionSoundErrorFatal( ++ const char *msg, /* optional message */ ++ DirectResult result /* result code to interpret */ ++ ); + + /* + * Returns a string describing 'result'. + */ + const char *FusionSoundErrorString( +- DFBResult result +- ); ++ DirectResult result ++ ); + + /* + * Retrieves information about supported command-line flags in the +@@ -423,7 +423,7 @@ typedef struct { + /* + * Called for each track provided by a music provider. + */ +-typedef DFBEnumerationResult (*FSTrackCallback) ( ++typedef DirectEnumerationResult (*FSTrackCallback) ( + FSTrackID track_id, + FSTrackDescription desc, + void *callbackdata +@@ -456,7 +456,7 @@ DEFINE_INTERFACE( IFusionSound, + /* + * Get a description of the sound device. + */ +- DFBResult (*GetDeviceDescription) ( ++ DirectResult (*GetDeviceDescription) ( + IFusionSound *thiz, + FSDeviceDescription *ret_desc + ); +@@ -471,7 +471,7 @@ DEFINE_INTERFACE( IFusionSound, + * Default values for sample rate, sample format and number of channels + * depend on device configuration. + */ +- DFBResult (*CreateBuffer) ( ++ DirectResult (*CreateBuffer) ( + IFusionSound *thiz, + const FSBufferDescription *desc, + IFusionSoundBuffer **interface +@@ -485,7 +485,7 @@ DEFINE_INTERFACE( IFusionSound, + * Default values for sample rate, sample format and number of channels + * depend on device configuration, while ring buffer length defaults to 1/5 seconds. + */ +- DFBResult (*CreateStream) ( ++ DirectResult (*CreateStream) ( + IFusionSound *thiz, + const FSStreamDescription *desc, + IFusionSoundStream **interface +@@ -494,7 +494,7 @@ DEFINE_INTERFACE( IFusionSound, + /* + * Create a music provider. + */ +- DFBResult (*CreateMusicProvider) ( ++ DirectResult (*CreateMusicProvider) ( + IFusionSound *thiz, + const char *filename, + IFusionSoundMusicProvider **interface +@@ -510,7 +510,7 @@ DEFINE_INTERFACE( IFusionSound, + * + * See also SetMasterVolume(). + */ +- DFBResult (*GetMasterVolume) ( ++ DirectResult (*GetMasterVolume) ( + IFusionSound *thiz, + float *level + ); +@@ -523,7 +523,7 @@ DEFINE_INTERFACE( IFusionSound, + * + * See also GetMasterVolume(). + */ +- DFBResult (*SetMasterVolume) ( ++ DirectResult (*SetMasterVolume) ( + IFusionSound *thiz, + float level + ); +@@ -536,7 +536,7 @@ DEFINE_INTERFACE( IFusionSound, + * + * See also SetLocalVolume(). + */ +- DFBResult (*GetLocalVolume) ( ++ DirectResult (*GetLocalVolume) ( + IFusionSound *thiz, + float *level + ); +@@ -550,7 +550,7 @@ DEFINE_INTERFACE( IFusionSound, + * + * See also GetLocalVolume(). + */ +- DFBResult (*SetLocalVolume) ( ++ DirectResult (*SetLocalVolume) ( + IFusionSound *thiz, + float level + ); +@@ -564,7 +564,7 @@ DEFINE_INTERFACE( IFusionSound, + * No other calls to FusionSound are allowed until Resume() + * has been called. + */ +- DFBResult (*Suspend) ( ++ DirectResult (*Suspend) ( + IFusionSound *thiz + ); + +@@ -573,7 +573,7 @@ DEFINE_INTERFACE( IFusionSound, + * + * Only to be called after Suspend(). + */ +- DFBResult (*Resume) ( ++ DirectResult (*Resume) ( + IFusionSound *thiz + ); + ) +@@ -622,7 +622,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + /* + * Get a description of the buffer. + */ +- DFBResult (*GetDescription) ( ++ DirectResult (*GetDescription) ( + IFusionSoundBuffer *thiz, + FSBufferDescription *ret_desc + ); +@@ -636,7 +636,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + * Set the buffer position indicator (in frames) + * affecting subsequent playback and lock for access. + */ +- DFBResult (*SetPosition) ( ++ DirectResult (*SetPosition) ( + IFusionSoundBuffer *thiz, + int position + ); +@@ -652,7 +652,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + * + * See also SetPosition(). + */ +- DFBResult (*Lock) ( ++ DirectResult (*Lock) ( + IFusionSoundBuffer *thiz, + void **ret_data, + int *ret_frames, +@@ -662,7 +662,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + /* + * Unlock a buffer. + */ +- DFBResult (*Unlock) ( ++ DirectResult (*Unlock) ( + IFusionSoundBuffer *thiz + ); + +@@ -679,7 +679,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + * + * See also CreatePlayback(). + */ +- DFBResult (*Play) ( ++ DirectResult (*Play) ( + IFusionSoundBuffer *thiz, + FSBufferPlayFlags flags + ); +@@ -692,7 +692,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + * + * See also CreatePlayback(). + */ +- DFBResult (*Stop) ( ++ DirectResult (*Stop) ( + IFusionSoundBuffer *thiz + ); + +@@ -704,7 +704,7 @@ DEFINE_INTERFACE( IFusionSoundBuffer, + * + * Each playback instance represents one concurrent playback of the buffer. + */ +- DFBResult (*CreatePlayback) ( ++ DirectResult (*CreatePlayback) ( + IFusionSoundBuffer *thiz, + IFusionSoundPlayback **interface + ); +@@ -739,7 +739,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + /* + * Get a description of the stream. + */ +- DFBResult (*GetDescription) ( ++ DirectResult (*GetDescription) ( + IFusionSoundStream *thiz, + FSStreamDescription *ret_desc + ); +@@ -758,7 +758,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * + * If this method returns successfully, all data has been written. + */ +- DFBResult (*Write) ( ++ DirectResult (*Write) ( + IFusionSoundStream *thiz, + const void *data, + int length +@@ -772,7 +772,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * + * Specifying a length of zero waits until playback has finished. + */ +- DFBResult (*Wait) ( ++ DirectResult (*Wait) ( + IFusionSoundStream *thiz, + int length + ); +@@ -787,13 +787,13 @@ DEFINE_INTERFACE( IFusionSoundStream, + * + * Simply pass NULL for values that are not of interest. + */ +- DFBResult (*GetStatus) ( ++ DirectResult (*GetStatus) ( + IFusionSoundStream *thiz, + int *filled, + int *total, + int *read_position, + int *write_position, +- DFBBoolean *playing ++ bool *playing + ); + + /* +@@ -802,7 +802,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * This method stops the playback immediately and + * discards any buffered data. + */ +- DFBResult (*Flush) ( ++ DirectResult (*Flush) ( + IFusionSoundStream *thiz + ); + +@@ -812,7 +812,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * This method discards any pending input data, + * making Write() return as soon as possible. + */ +- DFBResult (*Drop) ( ++ DirectResult (*Drop) ( + IFusionSoundStream *thiz + ); + +@@ -830,7 +830,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * Even if the stream is not playing, e.g. due to pre-buffering, + * the method behaves as if the playback has just been started. + */ +- DFBResult (*GetPresentationDelay) ( ++ DirectResult (*GetPresentationDelay) ( + IFusionSoundStream *thiz, + int *delay + ); +@@ -845,7 +845,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * This includes volume, pitch and pan settings as well as manual starting, pausing or + * stopping of the playback. + */ +- DFBResult (*GetPlayback) ( ++ DirectResult (*GetPlayback) ( + IFusionSoundStream *thiz, + IFusionSoundPlayback **interface + ); +@@ -865,7 +865,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * After filling the ring buffer, call Commit() to submit + * the samples to the stream. + */ +- DFBResult (*Access) ( ++ DirectResult (*Access) ( + IFusionSoundStream *thiz, + void **ret_data, + int *ret_avail +@@ -876,7 +876,7 @@ DEFINE_INTERFACE( IFusionSoundStream, + * + * Commit length frames of data written upon previous Access(). + */ +- DFBResult (*Commit) ( ++ DirectResult (*Commit) ( + IFusionSoundStream *thiz, + int length + ); +@@ -928,7 +928,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * + * This method can be used for seeking if the playback is already running. + */ +- DFBResult (*Start) ( ++ DirectResult (*Start) ( + IFusionSoundPlayback *thiz, + int start, + int stop +@@ -940,7 +940,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * This method stops a running playback. The playback can be continued + * by calling Continue() or restarted using Start(). + */ +- DFBResult (*Stop) ( ++ DirectResult (*Stop) ( + IFusionSoundPlayback *thiz + ); + +@@ -963,7 +963,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * IFusionSoundBuffer::Play(), but rejects multiple concurrent + * playbacks. + */ +- DFBResult (*Continue) ( ++ DirectResult (*Continue) ( + IFusionSoundPlayback *thiz + ); + +@@ -975,7 +975,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * If the playback is in looping mode the method returns immediately + * with an error. + */ +- DFBResult (*Wait) ( ++ DirectResult (*Wait) ( + IFusionSoundPlayback *thiz + ); + +@@ -990,9 +990,9 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * It also returns the current playback position or the position + * where Continue() would start to play. + */ +- DFBResult (*GetStatus) ( ++ DirectResult (*GetStatus) ( + IFusionSoundPlayback *thiz, +- DFBBoolean *running, ++ bool *running, + int *position + ); + +@@ -1005,7 +1005,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * The level is a linear factor being 1.0f by default, currently + * ranges from 0.0f to 64.0f due to internal mixing limitations. + */ +- DFBResult (*SetVolume) ( ++ DirectResult (*SetVolume) ( + IFusionSoundPlayback *thiz, + float level + ); +@@ -1015,7 +1015,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * + * The value ranges from -1.0f (left) to 1.0f (right). + */ +- DFBResult (*SetPan) ( ++ DirectResult (*SetPan) ( + IFusionSoundPlayback *thiz, + float value + ); +@@ -1026,7 +1026,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * The value is a linear factor being 1.0f by default, currently + * ranges from 0.0f to 64.0f due to internal mixing limitations. + */ +- DFBResult (*SetPitch) ( ++ DirectResult (*SetPitch) ( + IFusionSoundPlayback *thiz, + float value + ); +@@ -1034,7 +1034,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + /* + * Set the direction of the playback. + */ +- DFBResult (*SetDirection) ( ++ DirectResult (*SetDirection) ( + IFusionSoundPlayback *thiz, + FSPlaybackDirection direction + ); +@@ -1047,7 +1047,7 @@ DEFINE_INTERFACE( IFusionSoundPlayback, + * Levels are linear factors ranging from 0.0f to 1.0f and + * being 0.707f (-3dB) by default. + */ +- DFBResult (*SetDownmixLevels) ( ++ DirectResult (*SetDownmixLevels) ( + IFusionSoundPlayback *thiz, + float center, + float rear +@@ -1077,7 +1077,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * Retrieve information about the music provider's + * capabilities. + */ +- DFBResult (*GetCapabilities) ( ++ DirectResult (*GetCapabilities) ( + IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *ret_caps + ); +@@ -1090,7 +1090,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * used to select a track for playback using + * IFusionSoundMusicProvider::SelectTrack(). + */ +- DFBResult (*EnumTracks) ( ++ DirectResult (*EnumTracks) ( + IFusionSoundMusicProvider *thiz, + FSTrackCallback callback, + void *callbackdata +@@ -1099,7 +1099,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Get the unique ID of the current track. + */ +- DFBResult (*GetTrackID) ( ++ DirectResult (*GetTrackID) ( + IFusionSoundMusicProvider *thiz, + FSTrackID *ret_track_id + ); +@@ -1107,7 +1107,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Get a description of the current track. + */ +- DFBResult (*GetTrackDescription) ( ++ DirectResult (*GetTrackDescription) ( + IFusionSoundMusicProvider *thiz, + FSTrackDescription *ret_desc + ); +@@ -1116,7 +1116,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * Get a stream description that best matches the music + * contained in the file. + */ +- DFBResult (*GetStreamDescription) ( ++ DirectResult (*GetStreamDescription) ( + IFusionSoundMusicProvider *thiz, + FSStreamDescription *ret_desc + ); +@@ -1128,7 +1128,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * The music provider is responsible of returning a + * buffer description suitable for holding the whole track. + */ +- DFBResult (*GetBufferDescription) ( ++ DirectResult (*GetBufferDescription) ( + IFusionSoundMusicProvider *thiz, + FSBufferDescription *ret_desc + ); +@@ -1138,7 +1138,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Select a track by its unique ID. + */ +- DFBResult (*SelectTrack) ( ++ DirectResult (*SelectTrack) ( + IFusionSoundMusicProvider *thiz, + FSTrackID track_id + ); +@@ -1147,7 +1147,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * Play selected track rendering it into + * the destination stream. + */ +- DFBResult (*PlayToStream) ( ++ DirectResult (*PlayToStream) ( + IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination + ); +@@ -1162,7 +1162,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * samples per channels actually written + * to the destination buffer. + */ +- DFBResult (*PlayToBuffer) ( ++ DirectResult (*PlayToBuffer) ( + IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -1172,14 +1172,14 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Stop playback. + */ +- DFBResult (*Stop) ( ++ DirectResult (*Stop) ( + IFusionSoundMusicProvider *thiz + ); + + /* + * Get playback status. + */ +- DFBResult (*GetStatus) ( ++ DirectResult (*GetStatus) ( + IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *ret_status + ); +@@ -1189,7 +1189,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Seeks to a position within the current track. + */ +- DFBResult (*SeekTo) ( ++ DirectResult (*SeekTo) ( + IFusionSoundMusicProvider *thiz, + double seconds + ); +@@ -1197,7 +1197,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Gets current position within the current track. + */ +- DFBResult (*GetPos) ( ++ DirectResult (*GetPos) ( + IFusionSoundMusicProvider *thiz, + double *ret_seconds + ); +@@ -1205,7 +1205,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Gets the length of the current track. + */ +- DFBResult (*GetLength) ( ++ DirectResult (*GetLength) ( + IFusionSoundMusicProvider *thiz, + double *ret_seconds + ); +@@ -1215,7 +1215,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + /* + * Set the flags controlling playback. + */ +- DFBResult (*SetPlaybackFlags) ( ++ DirectResult (*SetPlaybackFlags) ( + IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags + ); +@@ -1228,7 +1228,7 @@ DEFINE_INTERFACE( IFusionSoundMusicProvider, + * if the specified timeout in milliseconds + * is non-zero, until timeout expires. + */ +- DFBResult (*WaitStatus) ( ++ DirectResult (*WaitStatus) ( + IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout +diff --git a/interfaces/IFusionSound/ifusionsound_module.c b/interfaces/IFusionSound/ifusionsound_module.c +index 3cd23a3..a1025fa 100644 +--- a/interfaces/IFusionSound/ifusionsound_module.c ++++ b/interfaces/IFusionSound/ifusionsound_module.c +@@ -36,9 +36,9 @@ + #include + + +-static DFBResult Probe( void *arg ); ++static DirectResult Probe( void *arg ); + +-static DFBResult Construct( IFusionSound *thiz, void *arg ); ++static DirectResult Construct( IFusionSound *thiz, void *arg ); + + #include + +@@ -47,17 +47,17 @@ DIRECT_INTERFACE_IMPLEMENTATION( IFusionSound, default ) + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( void *arg ) + { +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSound *thiz, + void *arg ) + { +- DFBResult ret; ++ DirectResult ret; + + ret = FusionSoundInit( NULL, NULL ); + if (ret) { +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c +index 4e5269d..20603a6 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c +@@ -47,10 +47,10 @@ + #include + #include + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -116,21 +116,21 @@ typedef struct { + + #include + +-static DFBResult ++static DirectResult + cdda_probe( int fd ) + { + struct cdrom_tochdr tochdr; + + if (ioctl( fd, CDROM_DRIVE_STATUS, CDSL_CURRENT ) != CDS_DISC_OK) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (ioctl( fd, CDROMREADTOCHDR, &tochdr ) < 0) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + unsigned int *ret_num ) + { +@@ -146,14 +146,14 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + if (ioctl( fd, CDROMREADTOCHDR, &tochdr ) == -1) { + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDROMREADTOCHDR ) failed!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + ms.addr_format = CDROM_LBA; + if (ioctl( fd, CDROMMULTISESSION, &ms ) == -1) { + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDROMMULTISESSION ) failed!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + total_tracks = tochdr.cdth_trk1 - tochdr.cdth_trk0 + 1; +@@ -172,7 +172,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDROMREADTOCENTRY ) failed!\n" ); + D_FREE( tracks ); +- return DFB_IO; ++ return DR_IO; + } + + /* skip data tracks */ +@@ -190,7 +190,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + + if (total_tracks < 1) { + D_FREE( tracks ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + memset( &tocentry, 0, sizeof(tocentry) ); +@@ -202,7 +202,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDROMREADTOCENTRY ) failed!\n" ); + D_FREE( tracks ); +- return DFB_IO; ++ return DR_IO; + } + + if (!ms.xa_flag) { +@@ -221,7 +221,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + *ret_tracks = tracks; + *ret_num = total_tracks; + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -246,18 +246,18 @@ cdda_read_audio( int fd, u8 *buf, int pos, int len ) + + #include + +-static DFBResult ++static DirectResult + cdda_probe( int fd ) + { + struct ioc_toc_header tochdr; + + if (ioctl( fd, CDIOREADTOCHEADER, &tochdr ) < 0) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + unsigned int *ret_num ) + { +@@ -272,7 +272,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + if (ioctl( fd, CDIOREADTOCHEADER, &tochdr ) == -1) { + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDIOREADTOCHEADER ) failed!\n" ); +- return DFB_IO; ++ return DR_IO; + } + + total_tracks = tochdr.ending_track - tochdr.starting_track + 1; +@@ -291,7 +291,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDIOREADTOCENTRY ) failed!\n" ); + D_FREE( tracks ); +- return DFB_IO; ++ return DR_IO; + } + + /* skip data tracks */ +@@ -309,7 +309,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + + if (total_tracks < 1) { + D_FREE( tracks ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + memset( &tocentry, 0, sizeof(tocentry) ); +@@ -321,7 +321,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + D_PERROR( "IFusionSoundMusicProvide_CDDA: " + "ioctl( CDIOREADTOCENTRY ) failed!\n" ); + D_FREE( tracks ); +- return DFB_IO; ++ return DR_IO; + } + + msf_lba = tocentry.entry.addr; +@@ -336,7 +336,7 @@ cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + *ret_tracks = tracks; + *ret_num = total_tracks; + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -359,18 +359,18 @@ cdda_read_audio( int fd, u8 *buf, int pos, int len ) + + #else + +-static DFBResult ++static DirectResult + cdda_probe( int fd ) + { + D_WARN( "unsupported system" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + cdda_build_tracklits( int fd, struct cdda_track **ret_tracks, + unsigned int *ret_num ) + { +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + static int +@@ -648,17 +648,17 @@ IFusionSoundMusicProvider_CDDA_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) +@@ -666,24 +666,24 @@ IFusionSoundMusicProvider_CDDA_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_CDDA_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + *caps = FMCAPS_BASIC | FMCAPS_SEEK; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_EnumTracks( IFusionSoundMusicProvider *thiz, + FSTrackCallback callback, + void *callbackdata ) +@@ -694,7 +694,7 @@ IFusionSoundMusicProvider_CDDA_EnumTracks( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!callback) +- return DFB_INVARG; ++ return DR_INVARG; + + for (i = 0; i < data->total_tracks; i++) { + struct cdda_track *track = &data->tracks[i]; +@@ -718,24 +718,24 @@ IFusionSoundMusicProvider_CDDA_EnumTracks( IFusionSoundMusicProvider *thiz, + break; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetTrackID( IFusionSoundMusicProvider *thiz, + FSTrackID *ret_track_id ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!ret_track_id) +- return DFB_INVARG; ++ return DR_INVARG; + + *ret_track_id = data->current_track; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { +@@ -744,7 +744,7 @@ IFusionSoundMusicProvider_CDDA_GetTrackDescription( IFusionSoundMusicProvider *t + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + memset( desc, 0, sizeof(FSTrackDescription) ); + +@@ -763,17 +763,17 @@ IFusionSoundMusicProvider_CDDA_GetTrackDescription( IFusionSoundMusicProvider *t + direct_snputs( desc->encoding, "PCM 16 bit", FS_TRACK_DESC_ENCODING_LENGTH ); + desc->bitrate = CD_FRAMES_PER_SECOND * CD_BYTES_PER_FRAME * 8; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -782,10 +782,10 @@ IFusionSoundMusicProvider_CDDA_GetStreamDescription( IFusionSoundMusicProvider * + desc->sampleformat = FSSF_S16; + desc->buffersize = 4704; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { +@@ -794,7 +794,7 @@ IFusionSoundMusicProvider_CDDA_GetBufferDescription( IFusionSoundMusicProvider * + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + track = &data->tracks[data->current_track]; + +@@ -807,23 +807,23 @@ IFusionSoundMusicProvider_CDDA_GetBufferDescription( IFusionSoundMusicProvider * + if (desc->length > FS_MAX_FRAMES) + desc->length = FS_MAX_FRAMES; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_SelectTrack( IFusionSoundMusicProvider *thiz, + FSTrackID track_id ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (track_id > data->total_tracks) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + data->current_track = track_id; + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -914,7 +914,7 @@ CDDAStreamThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +@@ -924,17 +924,17 @@ IFusionSoundMusicProvider_CDDA_PlayToStream( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != 44100) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether number of channels is supported */ + if (desc.channels > 2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -945,12 +945,12 @@ IFusionSoundMusicProvider_CDDA_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check destination buffer size */ + if (desc.buffersize < CD_BYTES_PER_FRAME/4) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + pthread_mutex_lock( &data->lock ); + +@@ -985,7 +985,7 @@ IFusionSoundMusicProvider_CDDA_PlayToStream( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -1013,7 +1013,7 @@ CDDABufferThread( DirectThread *thread, void *ctx ) + data->tracks[data->current_track].length - pos ); + pos += data->tracks[data->current_track].start; + +- if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DFB_OK) { ++ if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_CDDA: " + "Couldn't lock destination buffer!\n" ); + data->status = FMSTATE_FINISHED; +@@ -1073,7 +1073,7 @@ CDDABufferThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -1085,17 +1085,17 @@ IFusionSoundMusicProvider_CDDA_PlayToBuffer( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != 44100) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether number of channels is supported */ + if (desc.channels > 2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -1106,12 +1106,12 @@ IFusionSoundMusicProvider_CDDA_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check destination buffer size */ + if (desc.length < CD_BYTES_PER_FRAME/4) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + pthread_mutex_lock( &data->lock ); + +@@ -1148,10 +1148,10 @@ IFusionSoundMusicProvider_CDDA_PlayToBuffer( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) +@@ -1164,24 +1164,24 @@ IFusionSoundMusicProvider_CDDA_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +@@ -1191,22 +1191,22 @@ IFusionSoundMusicProvider_CDDA_SeekTo( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + track = &data->tracks[data->current_track]; + frame = seconds * CD_FRAMES_PER_SECOND; + if (frame >= track->length) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + pthread_mutex_lock( &data->lock ); + track->frame = frame; + data->seeked = true; + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1215,15 +1215,15 @@ IFusionSoundMusicProvider_CDDA_GetPos( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + track = &data->tracks[data->current_track]; + *seconds = (double)track->frame / CD_FRAMES_PER_SECOND; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1232,29 +1232,29 @@ IFusionSoundMusicProvider_CDDA_GetLength( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + track = &data->tracks[data->current_track]; + *seconds = (double)track->length / CD_FRAMES_PER_SECOND; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_CDDA_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -1262,7 +1262,7 @@ IFusionSoundMusicProvider_CDDA_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_CDDA ) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -1274,18 +1274,18 @@ IFusionSoundMusicProvider_CDDA_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -1298,23 +1298,23 @@ IFusionSoundMusicProvider_CDDA_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + return cdda_probe( direct_stream_fileno( ctx->stream ) ); + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) + { +- DFBResult err; ++ DirectResult err; + + DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IFusionSoundMusicProvider_CDDA ) + +@@ -1324,7 +1324,7 @@ Construct( IFusionSoundMusicProvider *thiz, + data->fd = dup( direct_stream_fileno( stream ) ); + if (data->fd < 0) { + IFusionSoundMusicProvider_CDDA_Destruct( thiz ); +- return DFB_IO; ++ return DR_IO; + } + + /* reset to blocking mode */ +@@ -1332,7 +1332,7 @@ Construct( IFusionSoundMusicProvider *thiz, + fcntl( data->fd, F_GETFL ) & ~O_NONBLOCK ); + + err = cdda_build_tracklits( data->fd, &data->tracks, &data->total_tracks ); +- if (err != DFB_OK) { ++ if (err != DR_OK) { + IFusionSoundMusicProvider_CDDA_Destruct( thiz ); + return err; + } +@@ -1364,6 +1364,6 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_CDDA_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_CDDA_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c +index 9302248..2a99a16 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_ffmpeg.c +@@ -44,10 +44,10 @@ + #include + #include + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -113,7 +113,7 @@ av_read_callback( void *opaque, uint8_t *buf, int size ) + ret = direct_stream_read( data->stream, size, buf+len, &read ); + if (ret) { + if (!len) +- return (ret == DFB_EOF) ? 0 : -1; ++ return (ret == DR_EOF) ? 0 : -1; + break; + } + len += read; +@@ -147,11 +147,11 @@ av_seek_callback( void *opaque, offset_t offset, int whence ) + ret = direct_stream_seek( data->stream, pos-offset ); + break; + default: +- ret = DFB_UNSUPPORTED; ++ ret = DR_UNSUPPORTED; + break; + } + +- if (ret != DFB_OK) ++ if (ret != DR_OK) + return -1; + + return direct_stream_offset( data->stream ); +@@ -435,17 +435,17 @@ IFusionSoundMusicProvider_FFmpeg_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) +@@ -453,33 +453,33 @@ IFusionSoundMusicProvider_FFmpeg_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + *caps = FMCAPS_BASIC; + if (direct_stream_seekable( data->stream )) + *caps |= FMCAPS_SEEK; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + direct_snputs( desc->artist, data->ctx->author, FS_TRACK_DESC_ARTIST_LENGTH ); + direct_snputs( desc->title, data->ctx->title, FS_TRACK_DESC_TITLE_LENGTH ); +@@ -490,17 +490,17 @@ IFusionSoundMusicProvider_FFmpeg_GetTrackDescription( IFusionSoundMusicProvider + desc->bitrate = data->codec->bit_rate; + desc->replaygain = desc->replaygain_album = 0; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -509,17 +509,17 @@ IFusionSoundMusicProvider_FFmpeg_GetStreamDescription( IFusionSoundMusicProvider + desc->sampleformat = FSSF_S16; + desc->buffersize = desc->samplerate/8; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_SAMPLERATE | FSBDF_CHANNELS | + FSBDF_SAMPLEFORMAT | FSBDF_LENGTH; +@@ -531,7 +531,7 @@ IFusionSoundMusicProvider_FFmpeg_GetBufferDescription( IFusionSoundMusicProvider + else + desc->length = MIN((s64)data->ctx->duration*desc->samplerate/AV_TIME_BASE, FS_MAX_FRAMES); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -644,7 +644,7 @@ FFmpegStreamThread( DirectThread *thread, void *ctx ) + return (void*)0; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +@@ -653,16 +653,16 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.stream == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != data->codec->sample_rate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -673,7 +673,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check whether destination mode is supported */ +@@ -693,7 +693,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -703,7 +703,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + if (data->finished) { + if (av_seek_frame( data->ctx, -1, 0, AVSEEK_FLAG_BACKWARD ) < 0) { + pthread_mutex_unlock( &data->lock ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + data->finished = false; + } +@@ -712,7 +712,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + data->buf = D_MALLOC( AVCODEC_MAX_AUDIO_FRAME_SIZE ); + if (!data->buf) { + pthread_mutex_unlock( &data->lock ); +- return DFB_NOSYSTEMMEMORY; ++ return DR_NOLOCALMEMORY; + } + } + +@@ -730,7 +730,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToStream( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -860,7 +860,7 @@ FFmpegBufferThread( DirectThread *thread, void *ctx ) + return (void*)0; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -871,16 +871,16 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.buffer == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != data->codec->sample_rate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -891,7 +891,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check whether destination mode is supported */ +@@ -911,7 +911,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -921,7 +921,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + if (data->finished) { + if (av_seek_frame( data->ctx, -1, 0, AVSEEK_FLAG_BACKWARD ) < 0) { + pthread_mutex_unlock( &data->lock ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + data->finished = false; + } +@@ -930,7 +930,7 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + data->buf = D_MALLOC( AVCODEC_MAX_AUDIO_FRAME_SIZE ); + if (!data->buf) { + pthread_mutex_unlock( &data->lock ); +- return DFB_NOSYSTEMMEMORY; ++ return DR_NOLOCALMEMORY; + } + } + +@@ -951,10 +951,10 @@ IFusionSoundMusicProvider_FFmpeg_PlayToBuffer( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) +@@ -967,41 +967,41 @@ IFusionSoundMusicProvider_FFmpeg_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +- DFBResult ret; ++ DirectResult ret; + s64 time; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + if (!direct_stream_seekable( data->stream )) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + time = seconds * AV_TIME_BASE; + if (data->ctx->duration != AV_NOPTS_VALUE && time > data->ctx->duration) +- return DFB_OK; ++ return DR_OK; + + pthread_mutex_lock( &data->lock ); + +@@ -1010,10 +1010,10 @@ IFusionSoundMusicProvider_FFmpeg_SeekTo( IFusionSoundMusicProvider *thiz, + data->seeked = true; + data->finished = false; + data->pts = time; +- ret = DFB_OK; ++ ret = DR_OK; + } + else { +- ret = DFB_FAILURE; ++ ret = DR_FAILURE; + } + + pthread_mutex_unlock( &data->lock ); +@@ -1021,7 +1021,7 @@ IFusionSoundMusicProvider_FFmpeg_SeekTo( IFusionSoundMusicProvider *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1030,7 +1030,7 @@ IFusionSoundMusicProvider_FFmpeg_GetPos( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + pos = data->pts; + if (data->dest.stream) { +@@ -1042,43 +1042,43 @@ IFusionSoundMusicProvider_FFmpeg_GetPos( IFusionSoundMusicProvider *thiz, + + *seconds = (double)pos / AV_TIME_BASE; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->ctx->duration > 0) { + *seconds = (double)data->ctx->duration / AV_TIME_BASE; +- return DFB_OK; ++ return DR_OK; + } + + *seconds = 0.0; + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_FFmpeg_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -1086,7 +1086,7 @@ IFusionSoundMusicProvider_FFmpeg_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_FFmpeg ) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -1098,18 +1098,18 @@ IFusionSoundMusicProvider_FFmpeg_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -1122,12 +1122,12 @@ IFusionSoundMusicProvider_FFmpeg_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /*****************************************************************************/ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + AVProbeData pd; +@@ -1146,13 +1146,13 @@ Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + !strcmp( format->name, "aac" ) || + !strcmp( format->name, "ac3" ) || + !strcmp( format->name, "flac" )) +- return DFB_OK; ++ return DR_OK; + } + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) +@@ -1178,7 +1178,7 @@ Construct( IFusionSoundMusicProvider *thiz, + fmt = av_probe_input_format( &pd, 1 ); + if (!fmt) { + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_INIT; ++ return DR_INIT; + } + + data->iobuf = D_MALLOC( 4096 ); +@@ -1192,19 +1192,19 @@ Construct( IFusionSoundMusicProvider *thiz, + direct_stream_seekable( stream ) ? av_seek_callback : NULL ) < 0) { + D_ERROR( "IFusionSoundMusicProvider_FFmpeg: init_put_byte() failed!\n" ); + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_INIT; ++ return DR_INIT; + } + + if (av_open_input_stream( &data->ctx, &data->pb, filename, fmt, NULL ) < 0) { + D_ERROR( "IFusionSoundMusicProvider_FFmpeg: av_open_input_stream() failed!\n" ); + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (av_find_stream_info( data->ctx ) < 0) { + D_ERROR( "IFusionSoundMusicProvider_FFmpeg: couldn't find stream info!\n" ); + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + for (i = 0; i < data->ctx->nb_streams; i++) { +@@ -1217,7 +1217,7 @@ Construct( IFusionSoundMusicProvider *thiz, + if (!data->st) { + D_ERROR( "IFusionSoundMusicProvider_FFmpeg: couldn't find audio stream!\n" ); + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + data->codec = data->st->codec; +@@ -1225,7 +1225,7 @@ Construct( IFusionSoundMusicProvider *thiz, + if (!c || avcodec_open( data->codec, c ) < 0) { + D_ERROR( "IFusionSoundMusicProvider_FFmpeg: couldn't find audio decoder!\n" ); + IFusionSoundMusicProvider_FFmpeg_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + direct_util_recursive_pthread_mutex_init( &data->lock ); +@@ -1248,5 +1248,5 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_FFmpeg_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_FFmpeg_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_mad.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_mad.c +index 04efb9f..bd45b3f 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_mad.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_mad.c +@@ -44,10 +44,10 @@ + #include + + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -429,17 +429,17 @@ IFusionSoundMusicProvider_Mad_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) +@@ -447,47 +447,47 @@ IFusionSoundMusicProvider_Mad_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_Mad_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + *caps = FMCAPS_BASIC | FMCAPS_HALFRATE; + if (direct_stream_seekable( data->s )) + *caps |= FMCAPS_SEEK; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + *desc = data->desc; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -496,17 +496,17 @@ IFusionSoundMusicProvider_Mad_GetStreamDescription( IFusionSoundMusicProvider *t + desc->sampleformat = FSSF_S32; + desc->buffersize = data->samplerate/8; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_SAMPLERATE | FSBDF_CHANNELS | + FSBDF_SAMPLEFORMAT | FSBDF_LENGTH; +@@ -515,7 +515,7 @@ IFusionSoundMusicProvider_Mad_GetBufferDescription( IFusionSoundMusicProvider *t + desc->sampleformat = FSSF_S32; + desc->length = MIN(data->frames, FS_MAX_FRAMES); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -529,7 +529,7 @@ MadStreamThread( DirectThread *thread, void *ctx ) + direct_stream_wait( data->s, data->read_size, NULL ); + + while (data->status == FMSTATE_PLAY) { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + unsigned int len = data->read_size; + int offset = 0; + struct timeval tv = { 0, 500 }; +@@ -554,7 +554,7 @@ MadStreamThread( DirectThread *thread, void *ctx ) + + if (offset < data->read_size) { + ret = direct_stream_wait( data->s, data->read_size, &tv ); +- if (ret != DFB_TIMEOUT) { ++ if (ret != DR_TIMEOUT) { + ret = direct_stream_read( data->s, + data->read_size-offset, + data->read_buffer+offset, &len ); +@@ -562,7 +562,7 @@ MadStreamThread( DirectThread *thread, void *ctx ) + } + + if (ret) { +- if (ret == DFB_EOF) { ++ if (ret == DR_EOF) { + if (data->flags & FMPLAY_LOOPING) { + direct_stream_seek( data->s, 0 ); + } +@@ -616,7 +616,7 @@ MadStreamThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +@@ -625,21 +625,21 @@ IFusionSoundMusicProvider_Mad_PlayToStream( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.stream == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != data->samplerate && + desc.samplerate != data->samplerate/2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether number of channels is supported */ + if (desc.channels > 6) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -650,7 +650,7 @@ IFusionSoundMusicProvider_Mad_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -691,7 +691,7 @@ IFusionSoundMusicProvider_Mad_PlayToStream( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -709,7 +709,7 @@ MadBufferThread( DirectThread *thread, void *ctx ) + direct_stream_wait( data->s, data->read_size, NULL ); + + while (data->status == FMSTATE_PLAY) { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + unsigned int len = data->read_size; + int offset = 0; + struct timeval tv = { 0, 500 }; +@@ -732,7 +732,7 @@ MadBufferThread( DirectThread *thread, void *ctx ) + + if (offset < data->read_size) { + ret = direct_stream_wait( data->s, data->read_size, &tv ); +- if (ret != DFB_TIMEOUT) { ++ if (ret != DR_TIMEOUT) { + ret = direct_stream_read( data->s, + data->read_size-offset, + data->read_buffer+offset, &len ); +@@ -740,7 +740,7 @@ MadBufferThread( DirectThread *thread, void *ctx ) + } + + if (ret) { +- if (ret == DFB_EOF) { ++ if (ret == DR_EOF) { + if (data->flags & FMPLAY_LOOPING) { + direct_stream_seek( data->s, 0 ); + } +@@ -778,7 +778,7 @@ MadBufferThread( DirectThread *thread, void *ctx ) + mad_synth_frame( &data->synth, &data->frame ); + len = pcm->length; + +- if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DFB_OK) { ++ if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_Mad: Couldn't lock buffer!\n" ); + break; + } +@@ -814,7 +814,7 @@ MadBufferThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -825,21 +825,21 @@ IFusionSoundMusicProvider_Mad_PlayToBuffer( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.buffer == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check whether destination samplerate is supported */ + if (desc.samplerate != data->samplerate && + desc.samplerate != data->samplerate/2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether number of channels is supported */ + if (desc.channels > 6) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check whether destination format is supported */ + switch (desc.sampleformat) { +@@ -850,7 +850,7 @@ IFusionSoundMusicProvider_Mad_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -895,10 +895,10 @@ IFusionSoundMusicProvider_Mad_PlayToBuffer( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) +@@ -911,35 +911,35 @@ IFusionSoundMusicProvider_Mad_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +- DFBResult ret = DFB_FAILURE; ++ DirectResult ret = DR_FAILURE; + double rate; + unsigned int off; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -947,7 +947,7 @@ IFusionSoundMusicProvider_Mad_SeekTo( IFusionSoundMusicProvider *thiz, + if (rate) { + off = (seconds*rate); + ret = direct_stream_seek( data->s, off ); +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + data->seeked = true; + data->finished = false; + } +@@ -958,7 +958,7 @@ IFusionSoundMusicProvider_Mad_SeekTo( IFusionSoundMusicProvider *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -968,10 +968,10 @@ IFusionSoundMusicProvider_Mad_GetPos( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + if (!data->desc.bitrate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + pos = direct_stream_offset( data->s ); + if (data->status == FMSTATE_PLAY && data->stream.this_frame) { +@@ -982,41 +982,41 @@ IFusionSoundMusicProvider_Mad_GetPos( IFusionSoundMusicProvider *thiz, + rate = (data->desc.bitrate ? : data->frame.header.bitrate) >> 3; + *seconds = (double)pos / rate; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = data->length; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (flags & FMPLAY_LOOPING && !direct_stream_seekable( data->s )) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Mad_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -1024,7 +1024,7 @@ IFusionSoundMusicProvider_Mad_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Mad ) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -1036,18 +1036,18 @@ IFusionSoundMusicProvider_Mad_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -1060,38 +1060,38 @@ IFusionSoundMusicProvider_Mad_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + char *ext; + + if (ctx->mimetype && !strcmp( ctx->mimetype, "audio/mpeg" )) +- return DFB_OK; ++ return DR_OK; + + ext = strrchr( ctx->filename, '.' ); + if (ext) { + if (!strcasecmp( ext, ".mp1" ) || + !strcasecmp( ext, ".mp2" ) || + !strcasecmp( ext, ".mp3" )) +- return DFB_OK; ++ return DR_OK; + } + + /* Detect by contents ? */ + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) + { +- DFBResult ret; ++ DirectResult ret; + u8 buf[16384]; + unsigned int pos = 0; + unsigned int len; +@@ -1149,7 +1149,7 @@ Construct( IFusionSoundMusicProvider *thiz, + if (error) { + D_ERROR( "IFusionSoundMusicProvider_Mad: Couldn't find a valid frame!\n" ); + IFusionSoundMusicProvider_Mad_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + header = data->frame.header; +@@ -1251,6 +1251,6 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_Mad_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_Mad_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_playlist.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_playlist.c +index 7baf8eb..ca7ca3f 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_playlist.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_playlist.c +@@ -36,10 +36,10 @@ + #include + + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -94,7 +94,7 @@ typedef struct { + + /*****************************************************************************/ + +-static DFBResult ++static DirectResult + add_media( FSTrackID id, + const char *url, + const char *artist, +@@ -124,7 +124,7 @@ add_media( FSTrackID id, + + direct_list_append( (DirectLink**)playlist, &entry->link ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -703,17 +703,17 @@ IFusionSoundMusicProvider_Playlist_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) +@@ -721,10 +721,10 @@ IFusionSoundMusicProvider_Playlist_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_Playlist_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { +@@ -733,10 +733,10 @@ IFusionSoundMusicProvider_Playlist_GetCapabilities( IFusionSoundMusicProvider + if (data->selected->provider) + return data->selected->provider->GetCapabilities( data->selected->provider, caps ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_EnumTracks( IFusionSoundMusicProvider *thiz, + FSTrackCallback callback, + void *callbackdata ) +@@ -746,7 +746,7 @@ IFusionSoundMusicProvider_Playlist_EnumTracks( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + + if (!callback) +- return DFB_INVARG; ++ return DR_INVARG; + + direct_list_foreach_safe (entry, tmp, data->playlist) { + FSTrackDescription desc; +@@ -768,27 +768,27 @@ IFusionSoundMusicProvider_Playlist_EnumTracks( IFusionSoundMusicProvider *thiz, + } + + if (callback( entry->id, desc, callbackdata )) +- return DFB_INTERRUPTED; ++ return DR_INTERRUPTED; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetTrackID( IFusionSoundMusicProvider *thiz, + FSTrackID *track_id ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + + if (!track_id) +- return DFB_INVARG; ++ return DR_INVARG; + + *track_id = data->selected->id; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { +@@ -797,7 +797,7 @@ IFusionSoundMusicProvider_Playlist_GetTrackDescription( IFusionSoundMusicProvide + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + entry = data->selected; + +@@ -817,10 +817,10 @@ IFusionSoundMusicProvider_Playlist_GetTrackDescription( IFusionSoundMusicProvide + direct_snputs( desc->album, entry->album, sizeof(desc->album) ); + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { +@@ -829,10 +829,10 @@ IFusionSoundMusicProvider_Playlist_GetStreamDescription( IFusionSoundMusicProvid + if (data->selected->provider) + return data->selected->provider->GetStreamDescription( data->selected->provider, desc ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { +@@ -841,10 +841,10 @@ IFusionSoundMusicProvider_Playlist_GetBufferDescription( IFusionSoundMusicProvid + if (data->selected->provider) + return data->selected->provider->GetBufferDescription( data->selected->provider, desc ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_SelectTrack( IFusionSoundMusicProvider *thiz, + FSTrackID track_id ) + { +@@ -854,7 +854,7 @@ IFusionSoundMusicProvider_Playlist_SelectTrack( IFusionSoundMusicProvider *thiz, + + direct_list_foreach (entry, data->playlist) { + IFusionSoundMusicProvider *provider; +- DFBResult ret; ++ DirectResult ret; + + if (entry->id != track_id) + continue; +@@ -886,17 +886,17 @@ IFusionSoundMusicProvider_Playlist_SelectTrack( IFusionSoundMusicProvider *thiz, + + entry->provider = provider; + +- return DFB_OK; ++ return DR_OK; + } + +- return DFB_ITEMNOTFOUND; ++ return DR_ITEMNOTFOUND; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +- DFBResult ret = DFB_UNSUPPORTED; ++ DirectResult ret = DR_UNSUPPORTED; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + +@@ -911,7 +911,7 @@ IFusionSoundMusicProvider_Playlist_PlayToStream( IFusionSoundMusicProvider *thiz + + if (data->selected->provider) { + ret = data->selected->provider->PlayToStream( data->selected->provider, destination ); +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + destination->AddRef( destination ); + data->stream = destination; + } +@@ -920,13 +920,13 @@ IFusionSoundMusicProvider_Playlist_PlayToStream( IFusionSoundMusicProvider *thiz + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, + void *ctx ) + { +- DFBResult ret = DFB_UNSUPPORTED; ++ DirectResult ret = DR_UNSUPPORTED; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) + +@@ -942,7 +942,7 @@ IFusionSoundMusicProvider_Playlist_PlayToBuffer( IFusionSoundMusicProvider *thiz + if (data->selected->provider) { + ret = data->selected->provider->PlayToBuffer( data->selected->provider, + destination, callback, ctx ); +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + destination->AddRef( destination ); + data->buffer = destination; + data->callback = callback; +@@ -953,7 +953,7 @@ IFusionSoundMusicProvider_Playlist_PlayToBuffer( IFusionSoundMusicProvider *thiz + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Playlist ) +@@ -970,10 +970,10 @@ IFusionSoundMusicProvider_Playlist_Stop( IFusionSoundMusicProvider *thiz ) + if (data->selected->provider) + return data->selected->provider->Stop( data->selected->provider ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { +@@ -982,10 +982,10 @@ IFusionSoundMusicProvider_Playlist_GetStatus( IFusionSoundMusicProvider *thiz, + if (data->selected->provider) + return data->selected->provider->GetStatus( data->selected->provider, status ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +@@ -994,10 +994,10 @@ IFusionSoundMusicProvider_Playlist_SeekTo( IFusionSoundMusicProvider *thiz, + if (data->selected->provider) + return data->selected->provider->SeekTo( data->selected->provider, seconds ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1006,10 +1006,10 @@ IFusionSoundMusicProvider_Playlist_GetPos( IFusionSoundMusicProvider *thiz, + if (data->selected->provider) + return data->selected->provider->GetPos( data->selected->provider, seconds ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1018,10 +1018,10 @@ IFusionSoundMusicProvider_Playlist_GetLength( IFusionSoundMusicProvider *thiz, + if (data->selected->provider) + return data->selected->provider->GetLength( data->selected->provider, seconds ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { +@@ -1032,10 +1032,10 @@ IFusionSoundMusicProvider_Playlist_SetPlaybackFlags( IFusionSoundMusicProvider + if (data->selected->provider) + return data->selected->provider->SetPlaybackFlags( data->selected->provider, flags ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Playlist_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -1045,22 +1045,22 @@ IFusionSoundMusicProvider_Playlist_WaitStatus( IFusionSoundMusicProvider *thiz, + if (data->selected->provider) + return data->selected->provider->WaitStatus( data->selected->provider, mask, timeout ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + if (get_playlist_type( ctx->mimetype, ctx->filename, + (const char*)ctx->header, sizeof(ctx->header) )) +- return DFB_OK; ++ return DR_OK; + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) +@@ -1088,7 +1088,7 @@ Construct( IFusionSoundMusicProvider *thiz, + if (direct_stream_read( stream, size, src+pos, &len )) { + D_FREE( src ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); +- return DFB_IO; ++ return DR_IO; + } + pos += len; + } +@@ -1110,7 +1110,7 @@ Construct( IFusionSoundMusicProvider *thiz, + + if (!src) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); +- return DFB_IO; ++ return DR_IO; + } + } + src[size] = 0; +@@ -1143,7 +1143,7 @@ Construct( IFusionSoundMusicProvider *thiz, + + if (!data->playlist) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + /* initialize function pointers */ +@@ -1169,5 +1169,5 @@ Construct( IFusionSoundMusicProvider *thiz, + /* select first media */ + thiz->SelectTrack( thiz, data->playlist->id ); + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c +index 0a0abce..23b1d29 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_timidity.c +@@ -42,10 +42,10 @@ + + #include + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -186,18 +186,18 @@ IFusionSoundMusicProvider_Timidity_Destruct( IFusionSoundMusicProvider *thiz ) + pthread_mutex_unlock( &timidity_lock ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) +@@ -205,10 +205,10 @@ IFusionSoundMusicProvider_Timidity_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_Timidity_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetCapabilities( + IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) +@@ -216,14 +216,14 @@ IFusionSoundMusicProvider_Timidity_GetCapabilities( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + *caps = FMCAPS_BASIC | FMCAPS_SEEK | FMCAPS_RESAMPLE; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetTrackDescription( + IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) +@@ -231,15 +231,15 @@ IFusionSoundMusicProvider_Timidity_GetTrackDescription( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + memset( desc, 0, sizeof(FSTrackDescription) ); + snprintf( desc->encoding, FS_TRACK_DESC_ENCODING_LENGTH, "MIDI" ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetStreamDescription( + IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) +@@ -247,7 +247,7 @@ IFusionSoundMusicProvider_Timidity_GetStreamDescription( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -256,10 +256,10 @@ IFusionSoundMusicProvider_Timidity_GetStreamDescription( + desc->sampleformat = FSSF_S16; + desc->buffersize = 11025; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetBufferDescription( + IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) +@@ -267,7 +267,7 @@ IFusionSoundMusicProvider_Timidity_GetBufferDescription( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_SAMPLERATE | FSBDF_CHANNELS | + FSBDF_SAMPLEFORMAT | FSBDF_LENGTH; +@@ -276,7 +276,7 @@ IFusionSoundMusicProvider_Timidity_GetBufferDescription( + desc->sampleformat = FSSF_S16; + desc->length = (data->song_length) ? (data->song_length*441/10) : 44100; + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -326,7 +326,7 @@ TimidityStreamThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_PlayToStream( + IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) +@@ -338,19 +338,19 @@ IFusionSoundMusicProvider_Timidity_PlayToStream( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + destination->GetDescription( destination, &desc ); + + if (desc.channels > 2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + switch (desc.sampleformat) { + case FSSF_U8: + case FSSF_S16: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -362,7 +362,7 @@ IFusionSoundMusicProvider_Timidity_PlayToStream( + if (!stream) { + D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't open input stream!\n" ); + pthread_mutex_unlock( &data->lock ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + options.rate = desc.samplerate; +@@ -377,7 +377,7 @@ IFusionSoundMusicProvider_Timidity_PlayToStream( + if (!data->song) { + D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't load song!\n" ); + pthread_mutex_unlock( &data->lock ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + data->song_length = mid_song_get_total_time( data->song ); +@@ -405,7 +405,7 @@ IFusionSoundMusicProvider_Timidity_PlayToStream( + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -435,7 +435,7 @@ TimidityBufferThread( DirectThread *thread, void *ctx ) + + data->song_pos = mid_song_get_time( data->song ); + +- if (data->buffer->Lock( data->buffer, &ptr, &len, 0 ) != DFB_OK) { ++ if (data->buffer->Lock( data->buffer, &ptr, &len, 0 ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't lock buffer!\n" ); + data->status = FMSTATE_FINISHED; + pthread_cond_broadcast( &data->cond ); +@@ -471,7 +471,7 @@ TimidityBufferThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_PlayToBuffer( + IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, +@@ -485,19 +485,19 @@ IFusionSoundMusicProvider_Timidity_PlayToBuffer( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + destination->GetDescription( destination, &desc ); + + if (desc.channels > 2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + switch (desc.sampleformat) { + case FSSF_U8: + case FSSF_S16: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -509,7 +509,7 @@ IFusionSoundMusicProvider_Timidity_PlayToBuffer( + if (!stream) { + D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't open input stream!\n" ); + pthread_mutex_unlock( &data->lock ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + options.rate = desc.samplerate; +@@ -524,7 +524,7 @@ IFusionSoundMusicProvider_Timidity_PlayToBuffer( + if (!data->song) { + D_ERROR( "IFusionSoundMusicProvider_Timidity: couldn't load song!\n" ); + pthread_mutex_unlock( &data->lock ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + data->song_length = mid_song_get_total_time( data->song ); +@@ -553,10 +553,10 @@ IFusionSoundMusicProvider_Timidity_PlayToBuffer( + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) +@@ -569,31 +569,31 @@ IFusionSoundMusicProvider_Timidity_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -603,38 +603,38 @@ IFusionSoundMusicProvider_Timidity_SeekTo( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = (double)data->song_pos / 1000.0; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = (double)data->song_length / 1000.0; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_SetPlaybackFlags( + IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) +@@ -642,14 +642,14 @@ IFusionSoundMusicProvider_Timidity_SetPlaybackFlags( + DIRECT_INTERFACE_GET_DATA (IFusionSoundMusicProvider_Timidity) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Timidity_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -657,7 +657,7 @@ IFusionSoundMusicProvider_Timidity_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Timidity ) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -669,18 +669,18 @@ IFusionSoundMusicProvider_Timidity_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -693,22 +693,22 @@ IFusionSoundMusicProvider_Timidity_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + if (!memcmp( ctx->header, "MThd", 4 )) +- return DFB_OK; ++ return DR_OK; + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) +@@ -718,7 +718,7 @@ Construct( IFusionSoundMusicProvider *thiz, + if (mid_init( NULL ) < 0) { + D_ERROR( "IFsusionSoundMusicProvider_Timidity: couldn't initialize TiMidity!\n" ); + pthread_mutex_unlock( &timidity_lock ); +- return DFB_INIT; ++ return DR_INIT; + } + } + timidity_refs++; +@@ -751,5 +751,5 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_Timidity_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_Timidity_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_vorbis.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_vorbis.c +index c84d15f..6d30f10 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_vorbis.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_vorbis.c +@@ -51,10 +51,10 @@ + # include + #endif + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -442,7 +442,7 @@ ov_read_callback( void *dst, size_t size, size_t nmemb, void *ctx ) + if (ret) { + memset( dst+length, 0, total-length ); + if (!length) +- return (ret == DFB_EOF) ? 0 : -1; ++ return (ret == DR_EOF) ? 0 : -1; + break; + } + length += read; +@@ -456,7 +456,7 @@ ov_seek_callback( void *ctx, ogg_int64_t offset, int whence ) + { + DirectStream *stream = ctx; + unsigned int pos = 0; +- DirectResult ret = DFB_UNSUPPORTED; ++ DirectResult ret = DR_UNSUPPORTED; + + if (!direct_stream_seekable( stream ) || direct_stream_remote( stream )) + return -1; +@@ -560,17 +560,17 @@ IFusionSoundMusicProvider_Vorbis_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) +@@ -578,17 +578,17 @@ IFusionSoundMusicProvider_Vorbis_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_Vorbis_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + #ifdef USE_TREMOR + *caps = FMCAPS_BASIC; +@@ -598,7 +598,7 @@ IFusionSoundMusicProvider_Vorbis_GetCapabilities( IFusionSoundMusicProvider *t + if (direct_stream_seekable( data->stream )) + *caps |= FMCAPS_SEEK; + +- return DFB_OK; ++ return DR_OK; + } + + static inline float +@@ -685,28 +685,28 @@ vorbis_get_metadata( OggVorbis_File *vf, + desc->replaygain_album = vorbis_compute_gain( album_gain, album_peak ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + vorbis_get_metadata( &data->vf, desc ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -719,17 +719,17 @@ IFusionSoundMusicProvider_Vorbis_GetStreamDescription( IFusionSoundMusicProvider + #endif + desc->buffersize = desc->samplerate/8; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_SAMPLERATE | FSBDF_CHANNELS | + FSBDF_SAMPLEFORMAT | FSBDF_LENGTH; +@@ -742,7 +742,7 @@ IFusionSoundMusicProvider_Vorbis_GetBufferDescription( IFusionSoundMusicProvider + #endif + desc->length = MIN(ov_pcm_total( &data->vf, -1 ), FS_MAX_FRAMES); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -818,7 +818,7 @@ VorbisStreamThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +@@ -827,21 +827,21 @@ IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.stream == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check if destination samplerate is supported */ + #ifdef USE_TREMOR + if (desc.samplerate != data->info->rate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + #else + if (desc.samplerate != data->info->rate && + desc.samplerate != data->info->rate/2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + #endif + + /* check if destination format is supported */ +@@ -853,7 +853,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check if destination mode is supported */ +@@ -873,7 +873,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -884,7 +884,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + if (desc.samplerate == data->info->rate/2) { + if (ov_halfrate( &data->vf, 1 )) { + pthread_mutex_unlock( &data->lock ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + } else { + ov_halfrate( &data->vf, 0 ); +@@ -915,7 +915,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToStream( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -947,7 +947,7 @@ VorbisBufferThread( DirectThread *thread, void *ctx ) + break; + } + +- if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DFB_OK) { ++ if (buffer->Lock( buffer, (void*)&dst, &size, 0 ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_Vorbis: " + "Couldn't lock buffer!\n" ); + pthread_mutex_unlock( &data->lock ); +@@ -1005,7 +1005,7 @@ VorbisBufferThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -1016,21 +1016,21 @@ IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.buffer == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check if destination samplerate is supported */ + #ifdef USE_TREMOR + if (desc.samplerate != data->info->rate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + #else + if (desc.samplerate != data->info->rate && + desc.samplerate != data->info->rate/2) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + #endif + + /* check if destination format is supported */ +@@ -1042,7 +1042,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check if destination mode is supported */ +@@ -1062,7 +1062,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -1073,7 +1073,7 @@ IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + if (desc.samplerate == data->info->rate/2) { + if (ov_halfrate( &data->vf, 1 )) { + pthread_mutex_unlock( &data->lock ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + } else { + ov_halfrate( &data->vf, 0 ); +@@ -1108,10 +1108,10 @@ IFusionSoundMusicProvider_Vorbis_PlayToBuffer( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) +@@ -1124,33 +1124,33 @@ IFusionSoundMusicProvider_Vorbis_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -1158,7 +1158,7 @@ IFusionSoundMusicProvider_Vorbis_SeekTo( IFusionSoundMusicProvider *thiz, + unsigned int off; + + if (!data->info->bitrate_nominal) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + off = seconds * (double)(data->info->bitrate_nominal >> 3); + ret = direct_stream_seek( data->stream, off ); +@@ -1168,10 +1168,10 @@ IFusionSoundMusicProvider_Vorbis_SeekTo( IFusionSoundMusicProvider *thiz, + seconds *= 1000; + #endif + if (ov_time_seek( &data->vf, seconds )) +- ret = DFB_FAILURE; ++ ret = DR_FAILURE; + } + +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + data->seeked = true; + data->finished = false; + } +@@ -1181,14 +1181,14 @@ IFusionSoundMusicProvider_Vorbis_SeekTo( IFusionSoundMusicProvider *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + #ifdef USE_TREMOR + *seconds = (double)ov_time_tell( &data->vf ) / 1000.0; +@@ -1196,10 +1196,10 @@ IFusionSoundMusicProvider_Vorbis_GetPos( IFusionSoundMusicProvider *thiz, + *seconds = ov_time_tell( &data->vf ); + #endif + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { +@@ -1208,7 +1208,7 @@ IFusionSoundMusicProvider_Vorbis_GetLength( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + #ifdef USE_TREMOR + length = (double)ov_time_total( &data->vf, -1 ) / 1000.0; +@@ -1224,27 +1224,27 @@ IFusionSoundMusicProvider_Vorbis_GetLength( IFusionSoundMusicProvider *thiz, + + *seconds = length; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis ) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (flags & FMPLAY_LOOPING && !direct_stream_seekable( data->stream )) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Vorbis_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -1252,7 +1252,7 @@ IFusionSoundMusicProvider_Vorbis_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Vorbis) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -1264,18 +1264,18 @@ IFusionSoundMusicProvider_Vorbis_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -1288,23 +1288,23 @@ IFusionSoundMusicProvider_Vorbis_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + if (!memcmp( &ctx->header[0], "OggS", 4 ) && + !memcmp( &ctx->header[29], "vorbis", 6 )) +- return DFB_OK; ++ return DR_OK; + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) +@@ -1326,7 +1326,7 @@ Construct( IFusionSoundMusicProvider *thiz, + D_ERROR( "IFusionSoundMusicProvider_Vorbis: " + "Error opening ogg/vorbis stream!\n" ); + IFusionSoundMusicProvider_Vorbis_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + data->info = ov_info( &data->vf, -1 ); +@@ -1334,7 +1334,7 @@ Construct( IFusionSoundMusicProvider *thiz, + D_ERROR( "IFusionSoundMusicProvider_Vorbis: " + "Error getting stream informations!\n" ); + IFusionSoundMusicProvider_Vorbis_Destruct( thiz ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + direct_util_recursive_pthread_mutex_init( &data->lock ); +@@ -1357,6 +1357,6 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_Vorbis_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_Vorbis_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_wave.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_wave.c +index be8b519..01ab270 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_wave.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_wave.c +@@ -43,10 +43,10 @@ + #include + + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ); + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ); +@@ -366,17 +366,17 @@ IFusionSoundMusicProvider_Wave_Destruct( IFusionSoundMusicProvider *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_AddRef( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_Release( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) +@@ -384,34 +384,34 @@ IFusionSoundMusicProvider_Wave_Release( IFusionSoundMusicProvider *thiz ) + if (--data->ref == 0) + IFusionSoundMusicProvider_Wave_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + if (direct_stream_seekable( data->stream )) + *caps = FMCAPS_BASIC | FMCAPS_SEEK; + else + *caps = FMCAPS_BASIC; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + memset( desc, 0, sizeof(FSTrackDescription) ); + snprintf( desc->encoding, +@@ -420,17 +420,17 @@ IFusionSoundMusicProvider_Wave_GetTrackDescription( IFusionSoundMusicProvider *t + FS_BITS_PER_SAMPLE(data->format) ); + desc->bitrate = data->samplerate * data->channels * FS_BITS_PER_SAMPLE(data->format); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_SAMPLERATE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_BUFFERSIZE; +@@ -439,17 +439,17 @@ IFusionSoundMusicProvider_Wave_GetStreamDescription( IFusionSoundMusicProvider * + desc->sampleformat = data->format; + desc->buffersize = data->samplerate/10; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_LENGTH | FSBDF_CHANNELS | + FSBDF_SAMPLEFORMAT | FSBDF_SAMPLERATE; +@@ -460,7 +460,7 @@ IFusionSoundMusicProvider_Wave_GetBufferDescription( IFusionSoundMusicProvider * + if (desc->length > FS_MAX_FRAMES) + desc->length = FS_MAX_FRAMES; + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -472,7 +472,7 @@ WaveStreamThread( DirectThread *thread, void *ctx ) + void *src = data->src_buffer; + + while (data->status == FMSTATE_PLAY) { +- DFBResult ret; ++ DirectResult ret; + unsigned int len = 0; + unsigned int pos = 0; + struct timeval tv = { 0, 1000 }; +@@ -502,7 +502,7 @@ WaveStreamThread( DirectThread *thread, void *ctx ) + } + + ret = direct_stream_wait( data->stream, count, &tv ); +- if (ret != DFB_TIMEOUT) { ++ if (ret != DR_TIMEOUT) { + ret = direct_stream_read( data->stream, count, src, &len ); + len /= data->framesize; + } +@@ -513,7 +513,7 @@ WaveStreamThread( DirectThread *thread, void *ctx ) + } + + if (ret) { +- if (ret == DFB_EOF) { ++ if (ret == DR_EOF) { + if (data->flags & FMPLAY_LOOPING) { + direct_stream_seek( data->stream, data->headsize ); + } +@@ -556,7 +556,7 @@ WaveStreamThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +@@ -566,16 +566,16 @@ IFusionSoundMusicProvider_Wave_PlayToStream( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.stream == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check if destination samplerate is supported */ + if (desc.samplerate != data->samplerate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check if destination format is supported */ + switch (desc.sampleformat) { +@@ -586,7 +586,7 @@ IFusionSoundMusicProvider_Wave_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check if destination mode is supported */ +@@ -606,7 +606,7 @@ IFusionSoundMusicProvider_Wave_PlayToStream( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -646,7 +646,7 @@ IFusionSoundMusicProvider_Wave_PlayToStream( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static void* +@@ -659,7 +659,7 @@ WaveBufferThread( DirectThread *thread, void *ctx ) + size_t count = data->dest.length * data->framesize; + + while (data->status == FMSTATE_PLAY) { +- DFBResult ret; ++ DirectResult ret; + void *dst; + int size; + unsigned int len = 0; +@@ -673,7 +673,7 @@ WaveBufferThread( DirectThread *thread, void *ctx ) + } + + if (!data->src_buffer) { +- if (buffer->Lock( buffer, &dst, 0, &size ) != DFB_OK) { ++ if (buffer->Lock( buffer, &dst, 0, &size ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_Wave: " + "Couldn't lock buffer!" ); + pthread_mutex_unlock( &data->lock ); +@@ -685,14 +685,14 @@ WaveBufferThread( DirectThread *thread, void *ctx ) + } + + ret = direct_stream_wait( data->stream, size, &tv ); +- if (ret != DFB_TIMEOUT) ++ if (ret != DR_TIMEOUT) + ret = direct_stream_read( data->stream, size, dst, &len ); + + if (!data->src_buffer) + buffer->Unlock( buffer ); + + if (ret) { +- if (ret == DFB_EOF) { ++ if (ret == DR_EOF) { + if (data->flags & FMPLAY_LOOPING) { + direct_stream_seek( data->stream, data->headsize ); + } +@@ -714,7 +714,7 @@ WaveBufferThread( DirectThread *thread, void *ctx ) + + if (data->src_buffer) { + while (len > 0) { +- if (buffer->Lock( buffer, &dst, &size, 0 ) != DFB_OK) { ++ if (buffer->Lock( buffer, &dst, &size, 0 ) != DR_OK) { + D_ERROR( "IFusionSoundMusicProvider_Wave: " + "Couldn't lock buffer!" ); + break; +@@ -753,7 +753,7 @@ WaveBufferThread( DirectThread *thread, void *ctx ) + return NULL; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, +@@ -764,16 +764,16 @@ IFusionSoundMusicProvider_Wave_PlayToBuffer( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!destination) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->dest.buffer == destination) +- return DFB_OK; ++ return DR_OK; + + destination->GetDescription( destination, &desc ); + + /* check if destination samplerate is supported */ + if (desc.samplerate != data->samplerate) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + /* check if destination format is supported */ + switch (desc.sampleformat) { +@@ -784,7 +784,7 @@ IFusionSoundMusicProvider_Wave_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSSF_FLOAT: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* check if destination mode is supported */ +@@ -804,7 +804,7 @@ IFusionSoundMusicProvider_Wave_PlayToBuffer( IFusionSoundMusicProvider *thiz, + case FSCM_SURROUND51: + break; + default: +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + pthread_mutex_lock( &data->lock ); +@@ -846,10 +846,10 @@ IFusionSoundMusicProvider_Wave_PlayToBuffer( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_Stop( IFusionSoundMusicProvider *thiz ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) +@@ -862,44 +862,44 @@ IFusionSoundMusicProvider_Wave_Stop( IFusionSoundMusicProvider *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = data->status; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +- DFBResult ret; ++ DirectResult ret; + int offset; + + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (seconds < 0.0) +- return DFB_INVARG; ++ return DR_INVARG; + + offset = (double)data->samplerate * seconds; + offset = offset * data->framesize; + if (data->datasize && offset > data->datasize) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + offset += data->headsize; + + pthread_mutex_lock( &data->lock ); + ret = direct_stream_seek( data->stream, offset ); +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + data->seeked = true; + data->finished = false; + } +@@ -908,53 +908,53 @@ IFusionSoundMusicProvider_Wave_SeekTo( IFusionSoundMusicProvider *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = (double) direct_stream_offset( data->stream ) / + (double)(data->samplerate * data->framesize); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = data->length; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (flags & ~FMPLAY_LOOPING) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (flags & FMPLAY_LOOPING && !direct_stream_seekable( data->stream )) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->flags = flags; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Wave_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) +@@ -962,7 +962,7 @@ IFusionSoundMusicProvider_Wave_WaitStatus( IFusionSoundMusicProvider *thiz, + DIRECT_INTERFACE_GET_DATA( IFusionSoundMusicProvider_Wave ) + + if (!mask || mask & ~FMSTATE_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (timeout) { + struct timespec t; +@@ -974,18 +974,18 @@ IFusionSoundMusicProvider_Wave_WaitStatus( IFusionSoundMusicProvider *thiz, + + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK + if (pthread_mutex_timedlock( &data->lock, &t )) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + #else + while (pthread_mutex_trylock( &data->lock )) { + usleep( 1000 ); + if (direct_clock_get_abs_micros() >= s) +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + #endif + while (!(data->status & mask)) { + if (pthread_cond_timedwait( &data->cond, &data->lock, &t ) == ETIMEDOUT) { + pthread_mutex_unlock( &data->lock ); +- return DFB_TIMEOUT; ++ return DR_TIMEOUT; + } + } + } +@@ -998,12 +998,12 @@ IFusionSoundMusicProvider_Wave_WaitStatus( IFusionSoundMusicProvider *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /****/ + +-static DFBResult ++static DirectResult + parse_headers( DirectStream *stream, u32 *ret_samplerate, + int *ret_channels, int *ret_format, + u32 *ret_headsize, u32 *ret_datasize ) +@@ -1024,13 +1024,13 @@ parse_headers( DirectStream *stream, u32 *ret_samplerate, + unsigned int len = 0; \ + direct_stream_wait( stream, count, NULL ); \ + if (direct_stream_read( stream, count, buf, &len ) || len < (count)) \ +- return DFB_UNSUPPORTED;\ ++ return DR_UNSUPPORTED;\ + } + + wave_read( buf, 4 ); + if (buf[0] != 'R' || buf[1] != 'I' || buf[2] != 'F' || buf[3] != 'F') { + D_DEBUG( "IFusionSoundMusicProvider_Wave: No RIFF header found.\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* actually ignore chunksize */ +@@ -1039,13 +1039,13 @@ parse_headers( DirectStream *stream, u32 *ret_samplerate, + wave_read( buf, 4 ); + if (buf[0] != 'W' || buf[1] != 'A' || buf[2] != 'V' || buf[3] != 'E') { + D_DEBUG( "IFusionSoundMusicProvider_Wave: No WAVE header found.\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + wave_read( buf, 4 ); + if (buf[0] != 'f' || buf[1] != 'm' || buf[2] != 't' || buf[3] != ' ') { + D_DEBUG( "IFusionSoundMusicProvider_Wave: Expected 'fmt ' header.\n" ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + wave_read( &fmt_len, 4 ); +@@ -1056,7 +1056,7 @@ parse_headers( DirectStream *stream, u32 *ret_samplerate, + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "fmt chunk expected to be at least %zu bytes (got %d).\n", + sizeof(fmt), fmt_len ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + wave_read( &fmt, sizeof(fmt) ); +@@ -1072,33 +1072,33 @@ parse_headers( DirectStream *stream, u32 *ret_samplerate, + if (fmt.encoding != 1) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Unsupported encoding (%d).\n", fmt.encoding ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + if (fmt.channels < 1) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Invalid number of channels (%d).\n", fmt.channels ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + if (fmt.frequency < 1000) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Unsupported frequency (%dHz).\n", fmt.frequency ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + if (fmt.bitspersample != 8 && fmt.bitspersample != 16 && + fmt.bitspersample != 24 && fmt.bitspersample != 32) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Unsupported sample format (%d bits).\n", fmt.bitspersample ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + if (fmt.byterate != (fmt.frequency * fmt.channels * fmt.bitspersample >> 3)) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Invalid byterate (%d).\n", fmt.byterate ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + if (fmt.blockalign != (fmt.channels * fmt.bitspersample >> 3)) { + D_DEBUG( "IFusionSoundMusicProvider_Wave: " + "Invalid blockalign (%d).\n", fmt.blockalign ); +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + if (fmt_len > sizeof(fmt)) { +@@ -1139,27 +1139,27 @@ parse_headers( DirectStream *stream, u32 *ret_samplerate, + + #undef wave_read + +- return DFB_OK; ++ return DR_OK; + } + + /* exported symbols */ + +-static DFBResult ++static DirectResult + Probe( IFusionSoundMusicProvider_ProbeContext *ctx ) + { + if (!memcmp( ctx->header+0, "RIFF", 4 ) && + !memcmp( ctx->header+8, "WAVEfmt ", 8 )) +- return DFB_OK; ++ return DR_OK; + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-static DFBResult ++static DirectResult + Construct( IFusionSoundMusicProvider *thiz, + const char *filename, + DirectStream *stream ) + { +- DFBResult ret; ++ DirectResult ret; + unsigned int size; + int format; + +@@ -1193,7 +1193,7 @@ Construct( IFusionSoundMusicProvider *thiz, + default: + D_BUG( "unexpected sample format" ); + IFusionSoundMusicProvider_Wave_Destruct( thiz ); +- return DFB_BUG; ++ return DR_BUG; + } + + data->framesize = data->channels * FS_BYTES_PER_SAMPLE(data->format); +@@ -1229,6 +1229,6 @@ Construct( IFusionSoundMusicProvider *thiz, + thiz->SetPlaybackFlags = IFusionSoundMusicProvider_Wave_SetPlaybackFlags; + thiz->WaitStatus = IFusionSoundMusicProvider_Wave_WaitStatus; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/proxy/dispatcher/ifusionsound_dispatcher.c b/proxy/dispatcher/ifusionsound_dispatcher.c +index 7d90cc9..7b5269c 100644 +--- a/proxy/dispatcher/ifusionsound_dispatcher.c ++++ b/proxy/dispatcher/ifusionsound_dispatcher.c +@@ -49,8 +49,8 @@ + + #include "ifusionsound_dispatcher.h" + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSound *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSound *thiz, + VoodooManager *manager, + VoodooInstanceID *ret_instance ); + +@@ -80,17 +80,17 @@ IFusionSound_Dispatcher_Destruct( IFusionSound *thiz ) + + /***********************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_AddRef( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_Release( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) +@@ -98,98 +98,98 @@ IFusionSound_Dispatcher_Release( IFusionSound *thiz ) + if (--data->ref == 0) + IFusionSound_Dispatcher_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_GetDeviceDescription( IFusionSound *thiz, + FSDeviceDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_CreateBuffer( IFusionSound *thiz, + const FSBufferDescription *desc, + IFusionSoundBuffer **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_CreateStream( IFusionSound *thiz, + const FSStreamDescription *desc, + IFusionSoundStream **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_CreateMusicProvider( IFusionSound *thiz, + const char *filename, + IFusionSoundMusicProvider **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_GetMasterVolume( IFusionSound *thiz, + float *level ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_SetMasterVolume( IFusionSound *thiz, + float level ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_GetLocalVolume( IFusionSound *thiz, + float *level ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_SetLocalVolume( IFusionSound *thiz, + float level ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_Suspend( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSound_Dispatcher_Resume( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + /**************************************************************************************************/ +@@ -208,7 +208,7 @@ Dispatch_GetDeviceDescription( IFusionSound *thiz, IFusionSound *real, + return ret; + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(FSDeviceDescription), &desc, + VMBT_NONE ); + } +@@ -244,7 +244,7 @@ Dispatch_CreateBuffer( IFusionSound *thiz, IFusionSound *real, + } + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, instance, ++ DR_OK, instance, + VMBT_DATA, sizeof(FSBufferDescription), &dsc, + VMBT_NONE ); + } +@@ -280,7 +280,7 @@ Dispatch_CreateStream( IFusionSound *thiz, IFusionSound *real, + } + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, instance, ++ DR_OK, instance, + VMBT_DATA, sizeof(FSStreamDescription), &dsc, + VMBT_NONE ); + } +@@ -313,7 +313,7 @@ Dispatch_CreateMusicProvider( IFusionSound *thiz, IFusionSound *real, + } + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, instance, ++ DR_OK, instance, + VMBT_NONE ); + } + +@@ -452,18 +452,18 @@ Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMes + HANDLE_CASE(Resume); + } + +- return DFB_NOSUCHMETHOD; ++ return DR_NOSUCHMETHOD; + } + + #undef HANDLE_CASE + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -471,10 +471,10 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSound *thiz, VoodooManager *manager, VoodooInstanceID *ret_instance ) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *real; + VoodooInstanceID instance; + +@@ -512,6 +512,6 @@ Construct( IFusionSound *thiz, VoodooManager *manager, VoodooInstanceID *ret_ins + thiz->Suspend = IFusionSound_Dispatcher_Suspend; + thiz->Resume = IFusionSound_Dispatcher_Resume; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/proxy/dispatcher/ifusionsoundbuffer_dispatcher.c b/proxy/dispatcher/ifusionsoundbuffer_dispatcher.c +index 6357ec0..84b4a71 100644 +--- a/proxy/dispatcher/ifusionsoundbuffer_dispatcher.c ++++ b/proxy/dispatcher/ifusionsoundbuffer_dispatcher.c +@@ -48,8 +48,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundBuffer *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundBuffer *thiz, + IFusionSoundBuffer *real, + VoodooManager *manager, + VoodooInstanceID super, +@@ -86,17 +86,17 @@ IFusionSoundBuffer_Dispatcher_Destruct( IFusionSoundBuffer *thiz ) + + /***********************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_AddRef( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_Release( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) +@@ -104,29 +104,29 @@ IFusionSoundBuffer_Dispatcher_Release( IFusionSoundBuffer *thiz ) + if (--data->ref == 0) + IFusionSoundBuffer_Dispatcher_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_GetDescription( IFusionSoundBuffer *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_SetPosition( IFusionSoundBuffer *thiz, + int position ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_Lock( IFusionSoundBuffer *thiz, + void **ret_data, + int *ret_frames, +@@ -134,41 +134,41 @@ IFusionSoundBuffer_Dispatcher_Lock( IFusionSoundBuffer *thiz, + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_Unlock( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_Play( IFusionSoundBuffer *thiz, + FSBufferPlayFlags flags ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_Stop( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Dispatcher_CreatePlayback( IFusionSoundBuffer *thiz, + IFusionSoundPlayback **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + /***********************************************************************************************/ +@@ -187,7 +187,7 @@ Dispatch_GetDescription( IFusionSoundBuffer *thiz, IFusionSoundBuffer *real, + return ret; + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(FSBufferDescription), &desc, + VMBT_NONE ); + } +@@ -220,7 +220,7 @@ Dispatch_Lock( IFusionSoundBuffer *thiz, IFusionSoundBuffer *real, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Dispatcher) + + /* Nothing to do. */ +- return DFB_OK; ++ return DR_OK; + } + + static DirectResult +@@ -251,7 +251,7 @@ Dispatch_Unlock( IFusionSoundBuffer *thiz, IFusionSoundBuffer *real, + real->Unlock( real ); + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_NONE ); + } + +@@ -283,7 +283,7 @@ Dispatch_Unlock_DPACK( IFusionSoundBuffer *thiz, IFusionSoundBuffer *real, + real->Unlock( real ); + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_NONE ); + } + +@@ -345,7 +345,7 @@ Dispatch_CreatePlayback( IFusionSoundBuffer *thiz, IFusionSoundBuffer *real, + } + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, instance, ++ DR_OK, instance, + VMBT_NONE ); + } + +@@ -374,18 +374,18 @@ Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMes + HANDLE_CASE(CreatePlayback); + } + +- return DFB_NOSUCHMETHOD; ++ return DR_NOSUCHMETHOD; + } + + #undef HANDLE_CASE + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -393,7 +393,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundBuffer *thiz, + IFusionSoundBuffer *real, + VoodooManager *manager, +@@ -401,7 +401,7 @@ Construct( IFusionSoundBuffer *thiz, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) + { +- DFBResult ret; ++ DirectResult ret; + VoodooInstanceID instance; + FSBufferDescription dsc; + +@@ -434,7 +434,7 @@ Construct( IFusionSoundBuffer *thiz, + thiz->Stop = IFusionSoundBuffer_Dispatcher_Stop; + thiz->CreatePlayback = IFusionSoundBuffer_Dispatcher_CreatePlayback; + +- return DFB_OK; ++ return DR_OK; + } + + +diff --git a/proxy/dispatcher/ifusionsoundplayback_dispatcher.c b/proxy/dispatcher/ifusionsoundplayback_dispatcher.c +index 7262b94..766cecd 100644 +--- a/proxy/dispatcher/ifusionsoundplayback_dispatcher.c ++++ b/proxy/dispatcher/ifusionsoundplayback_dispatcher.c +@@ -46,8 +46,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundPlayback *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundPlayback *thiz, + IFusionSoundPlayback *real, + VoodooManager *manager, + VoodooInstanceID super, +@@ -80,17 +80,17 @@ IFusionSoundPlayback_Dispatcher_Destruct( IFusionSoundPlayback *thiz ) + + /***********************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_AddRef( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_Release( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) +@@ -98,97 +98,97 @@ IFusionSoundPlayback_Dispatcher_Release( IFusionSoundPlayback *thiz ) + if (--data->ref == 0) + IFusionSoundPlayback_Dispatcher_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_Start( IFusionSoundPlayback *thiz, + int start, + int stop ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_Stop( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_Continue( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_Wait( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_GetStatus( IFusionSoundPlayback *thiz, +- DFBBoolean *ret_playing, ++ bool *ret_playing, + int *ret_position ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_SetVolume( IFusionSoundPlayback *thiz, + float level ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_SetPan( IFusionSoundPlayback *thiz, + float value ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_SetPitch( IFusionSoundPlayback *thiz, + float value ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_SetDirection( IFusionSoundPlayback *thiz, + FSPlaybackDirection direction ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Dispatcher_SetDownmixLevels( IFusionSoundPlayback *thiz, + float center, + float rear ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + /**************************************************************************************************/ +@@ -266,7 +266,7 @@ Dispatch_GetStatus( IFusionSoundPlayback *thiz, IFusionSoundPlayback *real, + VoodooManager *manager, VoodooRequestMessage *msg ) + { + DirectResult ret; +- DFBBoolean playing; ++ bool playing; + int position; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Dispatcher) +@@ -276,7 +276,7 @@ Dispatch_GetStatus( IFusionSoundPlayback *thiz, IFusionSoundPlayback *real, + return ret; + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, playing, + VMBT_INT, position, + VMBT_NONE ); +@@ -418,18 +418,18 @@ Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMes + HANDLE_CASE(SetDownmixLevels); + } + +- return DFB_NOSUCHMETHOD; ++ return DR_NOSUCHMETHOD; + } + + #undef HANDLE_CASE + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -437,7 +437,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundPlayback *thiz, + IFusionSoundPlayback *real, + VoodooManager *manager, +@@ -445,7 +445,7 @@ Construct( IFusionSoundPlayback *thiz, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) + { +- DFBResult ret; ++ DirectResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IFusionSoundPlayback_Dispatcher) +@@ -475,6 +475,6 @@ Construct( IFusionSoundPlayback *thiz, + thiz->SetDirection = IFusionSoundPlayback_Dispatcher_SetDirection; + thiz->SetDownmixLevels = IFusionSoundPlayback_Dispatcher_SetDownmixLevels; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/proxy/dispatcher/ifusionsoundstream_dispatcher.c b/proxy/dispatcher/ifusionsoundstream_dispatcher.c +index d01b6ab..b8728da 100644 +--- a/proxy/dispatcher/ifusionsoundstream_dispatcher.c ++++ b/proxy/dispatcher/ifusionsoundstream_dispatcher.c +@@ -48,8 +48,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundStream *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundStream *thiz, + IFusionSoundStream *real, + VoodooManager *manager, + VoodooInstanceID super, +@@ -86,17 +86,17 @@ IFusionSoundStream_Dispatcher_Destruct( IFusionSoundStream *thiz ) + + /***********************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_AddRef( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Release( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) +@@ -104,101 +104,101 @@ IFusionSoundStream_Dispatcher_Release( IFusionSoundStream *thiz ) + if (--data->ref == 0) + IFusionSoundStream_Dispatcher_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_GetDescription( IFusionSoundStream *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Write( IFusionSoundStream *thiz, + const void *sample_data, + int length ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Wait( IFusionSoundStream *thiz, + int length ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_GetStatus( IFusionSoundStream *thiz, + int *filled, + int *total, + int *read_position, + int *write_position, +- DFBBoolean *playing ) ++ bool *playing ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Flush( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Drop( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_GetPresentationDelay( IFusionSoundStream *thiz, + int *delay ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_GetPlayback( IFusionSoundStream *thiz, + IFusionSoundPlayback **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Access( IFusionSoundStream *thiz, + void **ret_data, + int *ret_avail ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Dispatcher_Commit( IFusionSoundStream *thiz, + int length ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + /**************************************************************************************************/ +@@ -217,7 +217,7 @@ Dispatch_GetDescription( IFusionSoundStream *thiz, IFusionSoundStream *real, + return ret; + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, VOODOO_INSTANCE_NONE, ++ DR_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(FSStreamDescription), &desc, + VMBT_NONE ); + } +@@ -303,7 +303,7 @@ Dispatch_GetStatus( IFusionSoundStream *thiz, IFusionSoundStream *real, + int total; + int read_pos; + int write_pos; +- DFBBoolean playing; ++ bool playing; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Dispatcher) + +@@ -388,7 +388,7 @@ Dispatch_GetPlayback( IFusionSoundStream *thiz, IFusionSoundStream *real, + } + + return voodoo_manager_respond( manager, msg->header.serial, +- DFB_OK, instance, ++ DR_OK, instance, + VMBT_NONE ); + } + +@@ -398,7 +398,7 @@ Dispatch_Access( IFusionSoundStream *thiz, IFusionSoundStream *real, + { + D_UNIMPLEMENTED(); + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + static DirectResult +@@ -407,7 +407,7 @@ Dispatch_Commit( IFusionSoundStream *thiz, IFusionSoundStream *real, + { + D_UNIMPLEMENTED(); + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + #define HANDLE_CASE(name) \ +@@ -441,18 +441,18 @@ Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMes + HANDLE_CASE(Commit); + } + +- return DFB_NOSUCHMETHOD; ++ return DR_NOSUCHMETHOD; + } + + #undef HANDLE_CASE + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -460,7 +460,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundStream *thiz, + IFusionSoundStream *real, + VoodooManager *manager, +@@ -468,7 +468,7 @@ Construct( IFusionSoundStream *thiz, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) + { +- DFBResult ret; ++ DirectResult ret; + VoodooInstanceID instance; + FSStreamDescription dsc; + +@@ -504,6 +504,6 @@ Construct( IFusionSoundStream *thiz, + thiz->Access = IFusionSoundStream_Dispatcher_Access; + thiz->Commit = IFusionSoundStream_Dispatcher_Commit; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/proxy/requestor/ifusionsound_requestor.c b/proxy/requestor/ifusionsound_requestor.c +index 6bf34b4..024f581 100644 +--- a/proxy/requestor/ifusionsound_requestor.c ++++ b/proxy/requestor/ifusionsound_requestor.c +@@ -48,8 +48,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSound *thiz, const char *host, int session ); ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSound *thiz, const char *host, int session ); + + #include + +@@ -82,17 +82,17 @@ IFusionSound_Requestor_Destruct( IFusionSound *thiz ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_AddRef( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_Release( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) +@@ -100,10 +100,10 @@ IFusionSound_Requestor_Release( IFusionSound *thiz ) + if (--data->ref == 0) + IFusionSound_Requestor_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_GetDeviceDescription( IFusionSound *thiz, + FSDeviceDescription *desc ) + { +@@ -120,7 +120,7 @@ IFusionSound_Requestor_GetDeviceDescription( IFusionSound *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); +@@ -133,7 +133,7 @@ IFusionSound_Requestor_GetDeviceDescription( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_CreateBuffer( IFusionSound *thiz, + const FSBufferDescription *desc, + IFusionSoundBuffer **ret_interface ) +@@ -147,7 +147,7 @@ IFusionSound_Requestor_CreateBuffer( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + if (!desc || !ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUND_METHOD_ID_CreateBuffer, VREQ_RESPOND, &response, +@@ -157,7 +157,7 @@ IFusionSound_Requestor_CreateBuffer( IFusionSound *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, dsc ); + VOODOO_PARSER_END( parser ); +@@ -173,7 +173,7 @@ IFusionSound_Requestor_CreateBuffer( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_CreateStream( IFusionSound *thiz, + const FSStreamDescription *desc, + IFusionSoundStream **ret_interface ) +@@ -187,7 +187,7 @@ IFusionSound_Requestor_CreateStream( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUND_METHOD_ID_CreateStream, VREQ_RESPOND, &response, +@@ -197,7 +197,7 @@ IFusionSound_Requestor_CreateStream( IFusionSound *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, dsc ); + VOODOO_PARSER_END( parser ); +@@ -213,7 +213,7 @@ IFusionSound_Requestor_CreateStream( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_CreateMusicProvider( IFusionSound *thiz, + const char *filename, + IFusionSoundMusicProvider **ret_interface ) +@@ -226,7 +226,7 @@ IFusionSound_Requestor_CreateMusicProvider( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + if (!filename || !ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUND_METHOD_ID_CreateMusicProvider, +@@ -237,7 +237,7 @@ IFusionSound_Requestor_CreateMusicProvider( IFusionSound *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) ++ if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IFusionSoundMusicProvider", + response->instance, NULL, &interface ); + +@@ -251,13 +251,13 @@ IFusionSound_Requestor_CreateMusicProvider( IFusionSound *thiz, + + /* Check arguments */ + if (!filename || !ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + return IFusionSoundMusicProvider_Create( filename, ret_interface ); + #endif + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_GetMasterVolume( IFusionSound *thiz, + float *level ) + { +@@ -268,7 +268,7 @@ IFusionSound_Requestor_GetMasterVolume( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + if (!level) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUND_METHOD_ID_GetMasterVolume, VREQ_RESPOND, &response, +@@ -291,7 +291,7 @@ IFusionSound_Requestor_GetMasterVolume( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_SetMasterVolume( IFusionSound *thiz, + float level ) + { +@@ -314,7 +314,7 @@ IFusionSound_Requestor_SetMasterVolume( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_GetLocalVolume( IFusionSound *thiz, + float *level ) + { +@@ -325,7 +325,7 @@ IFusionSound_Requestor_GetLocalVolume( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound_Requestor) + + if (!level) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUND_METHOD_ID_GetLocalVolume, VREQ_RESPOND, &response, +@@ -348,7 +348,7 @@ IFusionSound_Requestor_GetLocalVolume( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_SetLocalVolume( IFusionSound *thiz, + float level ) + { +@@ -371,7 +371,7 @@ IFusionSound_Requestor_SetLocalVolume( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_Suspend( IFusionSound *thiz ) + { + DirectResult ret; +@@ -392,7 +392,7 @@ IFusionSound_Requestor_Suspend( IFusionSound *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_Requestor_Resume( IFusionSound *thiz ) + { + DirectResult ret; +@@ -415,11 +415,11 @@ IFusionSound_Requestor_Resume( IFusionSound *thiz ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -427,10 +427,10 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSound *thiz, const char *host, int session ) + { +- DFBResult ret; ++ DirectResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IFusionSound_Requestor) + +@@ -464,7 +464,7 @@ Construct( IFusionSound *thiz, const char *host, int session ) + thiz->Suspend = IFusionSound_Requestor_Suspend; + thiz->Resume = IFusionSound_Requestor_Resume; + +- return DFB_OK; ++ return DR_OK; + } + + +diff --git a/proxy/requestor/ifusionsoundbuffer_requestor.c b/proxy/requestor/ifusionsoundbuffer_requestor.c +index a846ecf..af3171f 100644 +--- a/proxy/requestor/ifusionsoundbuffer_requestor.c ++++ b/proxy/requestor/ifusionsoundbuffer_requestor.c +@@ -50,8 +50,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundBuffer *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); +@@ -106,17 +106,17 @@ IFusionSoundBuffer_Requestor_Destruct( IFusionSoundBuffer *thiz ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_AddRef( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + data->ref++; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Release( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) +@@ -124,11 +124,11 @@ IFusionSoundBuffer_Requestor_Release( IFusionSoundBuffer *thiz ) + if (--data->ref == 0) + IFusionSoundBuffer_Requestor_Destruct( thiz ); + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_GetDescription( IFusionSoundBuffer *thiz, + FSBufferDescription *desc ) + { +@@ -138,7 +138,7 @@ IFusionSoundBuffer_Requestor_GetDescription( IFusionSoundBuffer *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDBUFFER_METHOD_ID_GetDescription, +@@ -148,7 +148,7 @@ IFusionSoundBuffer_Requestor_GetDescription( IFusionSoundBuffer *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); +@@ -161,7 +161,7 @@ IFusionSoundBuffer_Requestor_GetDescription( IFusionSoundBuffer *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_SetPosition( IFusionSoundBuffer *thiz, + int position ) + { +@@ -171,7 +171,7 @@ IFusionSoundBuffer_Requestor_SetPosition( IFusionSoundBuffer *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (position < 0 || position >= data->frames) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDBUFFER_METHOD_ID_SetPosition, VREQ_RESPOND, &response, +@@ -181,7 +181,7 @@ IFusionSoundBuffer_Requestor_SetPosition( IFusionSoundBuffer *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) ++ if (ret == DR_OK) + data->position = position; + + voodoo_manager_finish_request( data->manager, response ); +@@ -189,7 +189,7 @@ IFusionSoundBuffer_Requestor_SetPosition( IFusionSoundBuffer *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Lock( IFusionSoundBuffer *thiz, + void **ret_data, + int *ret_frames, +@@ -198,10 +198,10 @@ IFusionSoundBuffer_Requestor_Lock( IFusionSoundBuffer *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (!ret_data) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->locked) +- return DFB_LOCKED; ++ return DR_LOCKED; + + *ret_data = data->buffer; + +@@ -213,10 +213,10 @@ IFusionSoundBuffer_Requestor_Lock( IFusionSoundBuffer *thiz, + + data->locked = true; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Unlock( IFusionSoundBuffer *thiz ) + { + DirectResult ret; +@@ -228,7 +228,7 @@ IFusionSoundBuffer_Requestor_Unlock( IFusionSoundBuffer *thiz ) + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (!data->locked) +- return DFB_OK; ++ return DR_OK; + + src = data->buffer + data->position * data->bytes_per_frame; + offset = 0; +@@ -259,10 +259,10 @@ IFusionSoundBuffer_Requestor_Unlock( IFusionSoundBuffer *thiz ) + + data->locked = false; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Unlock_DPACK( IFusionSoundBuffer *thiz ) + { + DirectResult ret; +@@ -274,7 +274,7 @@ IFusionSoundBuffer_Requestor_Unlock_DPACK( IFusionSoundBuffer *thiz ) + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (!data->locked) +- return DFB_OK; ++ return DR_OK; + + src = data->buffer + data->position * data->bytes_per_frame; + offset = 0; +@@ -309,10 +309,10 @@ IFusionSoundBuffer_Requestor_Unlock_DPACK( IFusionSoundBuffer *thiz ) + + data->locked = false; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Play( IFusionSoundBuffer *thiz, + FSBufferPlayFlags flags ) + { +@@ -322,7 +322,7 @@ IFusionSoundBuffer_Requestor_Play( IFusionSoundBuffer *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (flags & ~FSPLAY_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDBUFFER_METHOD_ID_Play, VREQ_RESPOND, &response, +@@ -338,7 +338,7 @@ IFusionSoundBuffer_Requestor_Play( IFusionSoundBuffer *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_Stop( IFusionSoundBuffer *thiz ) + { + DirectResult ret; +@@ -359,7 +359,7 @@ IFusionSoundBuffer_Requestor_Stop( IFusionSoundBuffer *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Requestor_CreatePlayback( IFusionSoundBuffer *thiz, + IFusionSoundPlayback **ret_interface ) + { +@@ -370,7 +370,7 @@ IFusionSoundBuffer_Requestor_CreatePlayback( IFusionSoundBuffer *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer_Requestor) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDBUFFER_METHOD_ID_CreatePlayback, VREQ_RESPOND, &response, +@@ -379,7 +379,7 @@ IFusionSoundBuffer_Requestor_CreatePlayback( IFusionSoundBuffer *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) ++ if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IFusionSoundPlayback", + response->instance, NULL, &interface ); + +@@ -392,11 +392,11 @@ IFusionSoundBuffer_Requestor_CreatePlayback( IFusionSoundBuffer *thiz, + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -404,7 +404,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, +@@ -440,7 +440,7 @@ Construct( IFusionSoundBuffer *thiz, + thiz->Stop = IFusionSoundBuffer_Requestor_Stop; + thiz->CreatePlayback = IFusionSoundBuffer_Requestor_CreatePlayback; + +- return DFB_OK; ++ return DR_OK; + } + + +diff --git a/proxy/requestor/ifusionsoundplayback_requestor.c b/proxy/requestor/ifusionsoundplayback_requestor.c +index a85fdb4..4dca795 100644 +--- a/proxy/requestor/ifusionsoundplayback_requestor.c ++++ b/proxy/requestor/ifusionsoundplayback_requestor.c +@@ -46,8 +46,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundPlayback *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundPlayback *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); +@@ -84,17 +84,17 @@ IFusionSoundPlayback_Requestor_Destruct( IFusionSoundPlayback *thiz ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_AddRef( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_Release( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) +@@ -102,10 +102,10 @@ IFusionSoundPlayback_Requestor_Release( IFusionSoundPlayback *thiz ) + if (--data->ref == 0) + IFusionSoundPlayback_Requestor_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_Start( IFusionSoundPlayback *thiz, + int start, + int stop ) +@@ -116,7 +116,7 @@ IFusionSoundPlayback_Requestor_Start( IFusionSoundPlayback *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (start < 0) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_Start, VREQ_RESPOND, &response, +@@ -134,7 +134,7 @@ IFusionSoundPlayback_Requestor_Start( IFusionSoundPlayback *thiz, + } + + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_Stop( IFusionSoundPlayback *thiz ) + { + DirectResult ret; +@@ -155,7 +155,7 @@ IFusionSoundPlayback_Requestor_Stop( IFusionSoundPlayback *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_Continue( IFusionSoundPlayback *thiz ) + { + DirectResult ret; +@@ -176,7 +176,7 @@ IFusionSoundPlayback_Requestor_Continue( IFusionSoundPlayback *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_Wait( IFusionSoundPlayback *thiz ) + { + DirectResult ret; +@@ -197,20 +197,20 @@ IFusionSoundPlayback_Requestor_Wait( IFusionSoundPlayback *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_GetStatus( IFusionSoundPlayback *thiz, +- DFBBoolean *ret_playing, ++ bool *ret_playing, + int *ret_position ) + { + DirectResult ret; + VoodooResponseMessage *response; +- DFBBoolean playing = DFB_FALSE; ++ bool playing = DR_FALSE; + int position = 0; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (!ret_playing && !ret_position) +- return DFB_OK; ++ return DR_OK; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_GetStatus, VREQ_RESPOND, &response, +@@ -219,7 +219,7 @@ IFusionSoundPlayback_Requestor_GetStatus( IFusionSoundPlayback *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); +@@ -239,7 +239,7 @@ IFusionSoundPlayback_Requestor_GetStatus( IFusionSoundPlayback *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_SetVolume( IFusionSoundPlayback *thiz, + float level ) + { +@@ -249,7 +249,7 @@ IFusionSoundPlayback_Requestor_SetVolume( IFusionSoundPlayback *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (level < 0.0f || level > 64.f) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_SetVolume, VREQ_RESPOND, &response, +@@ -265,7 +265,7 @@ IFusionSoundPlayback_Requestor_SetVolume( IFusionSoundPlayback *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_SetPan( IFusionSoundPlayback *thiz, + float value ) + { +@@ -275,7 +275,7 @@ IFusionSoundPlayback_Requestor_SetPan( IFusionSoundPlayback *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (value < -1.0f || value > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_SetPan, VREQ_RESPOND, &response, +@@ -291,7 +291,7 @@ IFusionSoundPlayback_Requestor_SetPan( IFusionSoundPlayback *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_SetPitch( IFusionSoundPlayback *thiz, + float value ) + { +@@ -301,7 +301,7 @@ IFusionSoundPlayback_Requestor_SetPitch( IFusionSoundPlayback *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (value < 0.0f || value > 64.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_SetPitch, VREQ_RESPOND, &response, +@@ -317,7 +317,7 @@ IFusionSoundPlayback_Requestor_SetPitch( IFusionSoundPlayback *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_SetDirection( IFusionSoundPlayback *thiz, + FSPlaybackDirection direction ) + { +@@ -331,7 +331,7 @@ IFusionSoundPlayback_Requestor_SetDirection( IFusionSoundPlayback *thiz, + case FSPD_BACKWARD: + break; + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + + ret = voodoo_manager_request( data->manager, data->instance, +@@ -348,7 +348,7 @@ IFusionSoundPlayback_Requestor_SetDirection( IFusionSoundPlayback *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Requestor_SetDownmixLevels( IFusionSoundPlayback *thiz, + float center, + float rear ) +@@ -359,10 +359,10 @@ IFusionSoundPlayback_Requestor_SetDownmixLevels( IFusionSoundPlayback *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) + + if (center < 0.0f || center > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + if (rear < 0.0f || rear > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDPLAYBACK_METHOD_ID_SetDownmixLevels, VREQ_RESPOND, &response, +@@ -381,11 +381,11 @@ IFusionSoundPlayback_Requestor_SetDownmixLevels( IFusionSoundPlayback *thiz, + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -393,7 +393,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundPlayback *thiz, + VoodooManager *manager, + VoodooInstanceID instance, +@@ -418,6 +418,6 @@ Construct( IFusionSoundPlayback *thiz, + thiz->SetDirection = IFusionSoundPlayback_Requestor_SetDirection; + thiz->SetDownmixLevels = IFusionSoundPlayback_Requestor_SetDownmixLevels; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/proxy/requestor/ifusionsoundstream_requestor.c b/proxy/requestor/ifusionsoundstream_requestor.c +index 7405fbc..755e9fa 100644 +--- a/proxy/requestor/ifusionsoundstream_requestor.c ++++ b/proxy/requestor/ifusionsoundstream_requestor.c +@@ -50,8 +50,8 @@ + + #include + +-static DFBResult Probe(); +-static DFBResult Construct( IFusionSoundStream *thiz, ++static DirectResult Probe(); ++static DirectResult Construct( IFusionSoundStream *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); +@@ -102,17 +102,17 @@ IFusionSoundStream_Requestor_Destruct( IFusionSoundStream *thiz ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_AddRef( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Release( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) +@@ -120,10 +120,10 @@ IFusionSoundStream_Requestor_Release( IFusionSoundStream *thiz ) + if (--data->ref == 0) + IFusionSoundStream_Requestor_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_GetDescription( IFusionSoundStream *thiz, + FSStreamDescription *desc ) + { +@@ -133,7 +133,7 @@ IFusionSoundStream_Requestor_GetDescription( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDSTREAM_METHOD_ID_GetDescription, +@@ -143,7 +143,7 @@ IFusionSoundStream_Requestor_GetDescription( IFusionSoundStream *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) { ++ if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); +@@ -156,7 +156,7 @@ IFusionSoundStream_Requestor_GetDescription( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Write( IFusionSoundStream *thiz, + const void *samples, + int length ) +@@ -168,7 +168,7 @@ IFusionSoundStream_Requestor_Write( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!samples || length < 1) +- return DFB_INVARG; ++ return DR_INVARG; + + src = (u8*) samples; + while (length) { +@@ -194,10 +194,10 @@ IFusionSoundStream_Requestor_Write( IFusionSoundStream *thiz, + length -= len; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Write_DPACK( IFusionSoundStream *thiz, + const void *samples, + int length ) +@@ -209,7 +209,7 @@ IFusionSoundStream_Requestor_Write_DPACK( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!samples || length < 1) +- return DFB_INVARG; ++ return DR_INVARG; + + src = (u8*) samples; + while (length) { +@@ -239,10 +239,10 @@ IFusionSoundStream_Requestor_Write_DPACK( IFusionSoundStream *thiz, + length -= len; + } + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Wait( IFusionSoundStream *thiz, + int length ) + { +@@ -252,7 +252,7 @@ IFusionSoundStream_Requestor_Wait( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (length < 1 || length > data->frames) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDSTREAM_METHOD_ID_Wait, VREQ_RESPOND, &response, +@@ -268,13 +268,13 @@ IFusionSoundStream_Requestor_Wait( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_GetStatus( IFusionSoundStream *thiz, + int *ret_filled, + int *ret_total, + int *ret_read_pos, + int *ret_write_pos, +- DFBBoolean *ret_playing ) ++ bool *ret_playing ) + { + DirectResult ret; + VoodooResponseMessage *response; +@@ -283,7 +283,7 @@ IFusionSoundStream_Requestor_GetStatus( IFusionSoundStream *thiz, + int total; + int read_pos; + int write_pos; +- DFBBoolean playing; ++ bool playing; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + +@@ -327,7 +327,7 @@ IFusionSoundStream_Requestor_GetStatus( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Flush( IFusionSoundStream *thiz ) + { + DirectResult ret; +@@ -348,7 +348,7 @@ IFusionSoundStream_Requestor_Flush( IFusionSoundStream *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Drop( IFusionSoundStream *thiz ) + { + DirectResult ret; +@@ -369,7 +369,7 @@ IFusionSoundStream_Requestor_Drop( IFusionSoundStream *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_GetPresentationDelay( IFusionSoundStream *thiz, + int *delay ) + { +@@ -380,7 +380,7 @@ IFusionSoundStream_Requestor_GetPresentationDelay( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!delay) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDSTREAM_METHOD_ID_GetPresentationDelay, VREQ_RESPOND, &response, +@@ -403,7 +403,7 @@ IFusionSoundStream_Requestor_GetPresentationDelay( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_GetPlayback( IFusionSoundStream *thiz, + IFusionSoundPlayback **ret_interface ) + { +@@ -414,7 +414,7 @@ IFusionSoundStream_Requestor_GetPlayback( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IFUSIONSOUNDSTREAM_METHOD_ID_GetPlayback, VREQ_RESPOND, &response, +@@ -423,7 +423,7 @@ IFusionSoundStream_Requestor_GetPlayback( IFusionSoundStream *thiz, + return ret; + + ret = response->result; +- if (ret == DFB_OK) ++ if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IFusionSoundPlayback", + response->instance, NULL, &interface ); + +@@ -434,7 +434,7 @@ IFusionSoundStream_Requestor_GetPlayback( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Access( IFusionSoundStream *thiz, + void **ret_data, + int *ret_avail ) +@@ -442,7 +442,7 @@ IFusionSoundStream_Requestor_Access( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (!ret_data || !ret_avail) +- return DFB_INVARG; ++ return DR_INVARG; + + if (!data->buffer) + data->buffer = D_MALLOC( data->frames * data->bytes_per_frame ); +@@ -450,31 +450,31 @@ IFusionSoundStream_Requestor_Access( IFusionSoundStream *thiz, + *ret_data = data->buffer; + *ret_avail = data->buffer ? data->frames : 0; + +- return data->buffer ? DFB_OK : DFB_NOSYSTEMMEMORY; ++ return data->buffer ? DR_OK : DR_NOLOCALMEMORY; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Requestor_Commit( IFusionSoundStream *thiz, + int length ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream_Requestor) + + if (length < 0 || length > data->frames) +- return DFB_INVARG; ++ return DR_INVARG; + + if (length) + return thiz->Write( thiz, data->buffer, length ); + +- return DFB_OK; ++ return DR_OK; + } + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + Probe() + { + /* This implementation has to be loaded explicitly. */ +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + /* +@@ -482,7 +482,7 @@ Probe() + * + * Fills in function pointers and intializes data structure. + */ +-static DFBResult ++static DirectResult + Construct( IFusionSoundStream *thiz, + VoodooManager *manager, + VoodooInstanceID instance, +@@ -515,6 +515,6 @@ Construct( IFusionSoundStream *thiz, + thiz->Access = IFusionSoundStream_Requestor_Access; + thiz->Commit = IFusionSoundStream_Requestor_Commit; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/src/core/core_sound.c b/src/core/core_sound.c +index 449fe49..709732d 100644 +--- a/src/core/core_sound.c ++++ b/src/core/core_sound.c +@@ -149,14 +149,14 @@ static int fs_core_arena_shutdown ( FusionArena *arena, + + /******************************************************************************/ + +-static DFBResult fs_core_detach( CoreSound *core ); ++static DirectResult fs_core_detach( CoreSound *core ); + + /******************************************************************************/ + + static CoreSound *core_sound = NULL; + static pthread_mutex_t core_sound_lock = PTHREAD_MUTEX_INITIALIZER; + +-DFBResult ++DirectResult + fs_core_create( CoreSound **ret_core ) + { + int ret; +@@ -180,14 +180,14 @@ fs_core_create( CoreSound **ret_core ) + /* Unlock the core singleton mutex. */ + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /* Allocate local core structure. */ + core = D_CALLOC( 1, sizeof(CoreSound) ); + if (!core) { + pthread_mutex_unlock( &core_sound_lock ); +- return DFB_NOSYSTEMMEMORY; ++ return DR_NOLOCALMEMORY; + } + + ret = fusion_enter( fs_config->session, FUSIONSOUND_CORE_ABI, FER_ANY, &core->world ); +@@ -222,7 +222,7 @@ fs_core_create( CoreSound **ret_core ) + fusion_exit( core->world, false ); + D_FREE( core ); + pthread_mutex_unlock( &core_sound_lock ); +- return ret ? ret : DFB_FUSION; ++ return ret ? ret : DR_FUSION; + } + + if (fs_config->deinit_check) +@@ -234,10 +234,10 @@ fs_core_create( CoreSound **ret_core ) + /* Unlock the core singleton mutex. */ + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_core_destroy( CoreSound *core, bool emergency ) + { + D_ASSERT( core != NULL ); +@@ -253,7 +253,7 @@ fs_core_destroy( CoreSound *core, bool emergency ) + /* Unlock the core singleton mutex. */ + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + + direct_signal_handler_remove( core->signal_handler ); +@@ -264,7 +264,7 @@ fs_core_destroy( CoreSound *core, bool emergency ) + /* Exit the FusionSound core arena. */ + if (fusion_arena_exit( core->arena, fs_core_arena_shutdown, + core->master ? NULL : fs_core_arena_leave, +- core, emergency, NULL ) == DFB_BUSY) ++ core, emergency, NULL ) == DR_BUSY) + { + if (core->master) { + if (emergency) { +@@ -281,7 +281,7 @@ fs_core_destroy( CoreSound *core, bool emergency ) + + while (fusion_arena_exit( core->arena, fs_core_arena_shutdown, + core->master ? NULL : fs_core_arena_leave, +- core, emergency, NULL ) == DFB_BUSY) ++ core, emergency, NULL ) == DR_BUSY) + { + D_ONCE( "waiting for FusionSound slaves to terminate" ); + usleep( 100000 ); +@@ -303,7 +303,7 @@ fs_core_destroy( CoreSound *core, bool emergency ) + /* Unlock the core singleton mutex. */ + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + + CoreSoundBuffer * +@@ -370,7 +370,7 @@ fs_core_playlist_unlock( CoreSound *core ) + return fusion_skirmish_dismiss( &core->shared->playlist.lock ); + } + +-DFBResult ++DirectResult + fs_core_add_playback( CoreSound *core, + CorePlayback *playback ) + { +@@ -388,12 +388,12 @@ fs_core_add_playback( CoreSound *core, + /* Allocate playlist entry. */ + entry = SHCALLOC( shared->shmpool, 1, sizeof(CorePlaylistEntry) ); + if (!entry) +- return DFB_NOSYSTEMMEMORY; ++ return DR_NOLOCALMEMORY; + + /* Link playback to playlist entry. */ + if (fs_playback_link( &entry->playback, playback )) { + SHFREE( shared->shmpool, entry ); +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* Add it to the playback list. */ +@@ -402,10 +402,10 @@ fs_core_add_playback( CoreSound *core, + /* Notify new playlist entry to the sound thread. */ + fusion_skirmish_notify( &shared->playlist.lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_core_remove_playback( CoreSound *core, + CorePlayback *playback ) + { +@@ -434,7 +434,7 @@ fs_core_remove_playback( CoreSound *core, + } + } + +- return DFB_OK; ++ return DR_OK; + } + + int +@@ -482,11 +482,11 @@ fs_core_device_config( CoreSound *core ) + return &core->shared->config; + } + +-DFBResult ++DirectResult + fs_core_get_master_volume( CoreSound *core, float *level ) + { + CoreSoundShared *shared; +- DFBResult ret; ++ DirectResult ret; + int retval; + + D_ASSERT( core != NULL ); +@@ -511,11 +511,11 @@ fs_core_get_master_volume( CoreSound *core, float *level ) + return ret; + } + +-DFBResult ++DirectResult + fs_core_set_master_volume( CoreSound *core, float level ) + { + CoreSoundShared *shared; +- DFBResult ret; ++ DirectResult ret; + int retval; + + D_ASSERT( core != NULL ); +@@ -539,7 +539,7 @@ fs_core_set_master_volume( CoreSound *core, float level ) + return ret; + } + +-DFBResult ++DirectResult + fs_core_get_local_volume( CoreSound *core, float *level ) + { + D_ASSERT( core != NULL ); +@@ -551,7 +551,7 @@ fs_core_get_local_volume( CoreSound *core, float *level ) + + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + + static bool +@@ -569,7 +569,7 @@ volume_callback( FusionObjectPool *pool, FusionObject *object, void *ctx ) + return true; + } + +-DFBResult ++DirectResult + fs_core_set_local_volume( CoreSound *core, float level ) + { + D_ASSERT( core != NULL ); +@@ -583,13 +583,13 @@ fs_core_set_local_volume( CoreSound *core, float level ) + + pthread_mutex_unlock( &core_sound_lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_core_suspend( CoreSound *core ) + { +- DFBResult ret; ++ DirectResult ret; + int retval; + + D_ASSERT( core != NULL ); +@@ -603,10 +603,10 @@ fs_core_suspend( CoreSound *core ) + return ret; + } + +-DFBResult ++DirectResult + fs_core_resume( CoreSound *core ) + { +- DFBResult ret; ++ DirectResult ret; + int retval; + + D_ASSERT( core != NULL ); +@@ -645,7 +645,7 @@ fs_core_signal_handler( int num, void *addr, void *ctx ) + + fs_core_destroy( core, true ); + +- return DFB_OK; ++ return DR_OK; + } + + /******************************************************************************/ +@@ -878,7 +878,7 @@ sound_thread( DirectThread *thread, void *arg ) + } + + direct_list_foreach_safe (l, next, shared->playlist.entries) { +- DFBResult ret; ++ DirectResult ret; + CorePlaylistEntry *entry = (CorePlaylistEntry *) l; + CorePlayback *playback = entry->playback; + int num; +@@ -996,41 +996,41 @@ core_call_handler( int caller, int call_arg, void *call_ptr, + switch (call_arg) { + case CSCID_GET_VOLUME: + if (core->suspended) { +- *retval = DFB_SUSPENDED; ++ *retval = DR_SUSPENDED; + } + else { + if (!(fs_device_get_capabilities( core->device ) & DCF_VOLUME) || +- fs_device_get_volume( core->device, &volume ) != DFB_OK) ++ fs_device_get_volume( core->device, &volume ) != DR_OK) + volume = fsf_to_float( shared->soft_volume ); + + *((float*)call_ptr) = volume; + +- *retval = DFB_OK; ++ *retval = DR_OK; + } + break; + + case CSCID_SET_VOLUME: + if (core->suspended) { +- *retval = DFB_SUSPENDED; ++ *retval = DR_SUSPENDED; + } + else { + volume = *((float*)call_ptr); + if (!(fs_device_get_capabilities( core->device ) & DCF_VOLUME) || +- fs_device_set_volume( core->device, volume ) != DFB_OK) ++ fs_device_set_volume( core->device, volume ) != DR_OK) + shared->soft_volume = fsf_from_float( volume ); + else + shared->soft_volume = FSF_ONE; + +- *retval = DFB_OK; ++ *retval = DR_OK; + } + break; + + case CSCID_SUSPEND: + if (core->suspended) { +- *retval = DFB_BUSY; ++ *retval = DR_BUSY; + } + else { +- DFBResult ret; ++ DirectResult ret; + + direct_thread_cancel( core->sound_thread ); + direct_thread_join( core->sound_thread ); +@@ -1047,16 +1047,16 @@ core_call_handler( int caller, int call_arg, void *call_ptr, + + core->suspended = true; + +- *retval = DFB_OK; ++ *retval = DR_OK; + } + break; + + case CSCID_RESUME: + if (!core->suspended) { +- *retval = DFB_BUSY; ++ *retval = DR_BUSY; + } + else { +- DFBResult ret; ++ DirectResult ret; + + ret = fs_device_resume( core->device ); + if (ret) { +@@ -1068,7 +1068,7 @@ core_call_handler( int caller, int call_arg, void *call_ptr, + + core->suspended = false; + +- *retval = DFB_OK; ++ *retval = DR_OK; + } + break; + +@@ -1080,11 +1080,11 @@ core_call_handler( int caller, int call_arg, void *call_ptr, + return FCHR_RETURN; + } + +-static DFBResult ++static DirectResult + fs_core_initialize( CoreSound *core ) + { + CoreSoundShared *shared = core->shared; +- DFBResult ret; ++ DirectResult ret; + + /* Set default device configuration. */ + shared->config.mode = fs_config->channelmode; +@@ -1130,26 +1130,26 @@ fs_core_initialize( CoreSound *core ) + /* Start sound mixer. */ + core->sound_thread = direct_thread_create( DTT_OUTPUT, sound_thread, core, "Sound Mixer" ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + fs_core_join( CoreSound *core ) + { + /* really nothing to be done here, yet ;) */ + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + fs_core_leave( CoreSound *core ) + { + /* really nothing to be done here, yet ;) */ + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + fs_core_shutdown( CoreSound *core, bool local ) + { + DirectLink *l, *next; +@@ -1204,10 +1204,10 @@ fs_core_shutdown( CoreSound *core, bool local ) + /* Release mixing buffer. */ + D_FREE( core->mixing_buffer ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + fs_core_detach( CoreSound *core ) + { + int ret; +@@ -1226,7 +1226,7 @@ fs_core_detach( CoreSound *core ) + D_PERROR( "fork()" ); + fusion_kill( core->world, 0, SIGTERM, 5000 ); + fusion_kill( core->world, 0, SIGKILL, 2000 ); +- return DFB_FAILURE; ++ return DR_FAILURE; + + case 0: + D_DEBUG( "FusionSound/Core: ... detached.\n" ); +@@ -1243,7 +1243,7 @@ fs_core_detach( CoreSound *core ) + break; + } + +- return DFB_OK; ++ return DR_OK; + } + + +@@ -1253,7 +1253,7 @@ static int + fs_core_arena_initialize( FusionArena *arena, + void *ctx ) + { +- DFBResult ret; ++ DirectResult ret; + CoreSound *core = ctx; + CoreSoundShared *shared; + FusionSHMPoolShared *pool; +@@ -1289,7 +1289,7 @@ fs_core_arena_initialize( FusionArena *arena, + /* Register shared data. */ + fusion_arena_add_shared_field( arena, "Core/Shared", shared ); + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -1297,7 +1297,7 @@ fs_core_arena_shutdown( FusionArena *arena, + void *ctx, + bool emergency) + { +- DFBResult ret; ++ DirectResult ret; + CoreSound *core = ctx; + CoreSoundShared *shared; + FusionSHMPoolShared *pool; +@@ -1322,14 +1322,14 @@ fs_core_arena_shutdown( FusionArena *arena, + + fusion_shm_pool_destroy( core->world, pool ); + +- return DFB_OK; ++ return DR_OK; + } + + static int + fs_core_arena_join( FusionArena *arena, + void *ctx ) + { +- DFBResult ret; ++ DirectResult ret; + CoreSound *core = ctx; + CoreSoundShared *shared; + +@@ -1337,7 +1337,7 @@ fs_core_arena_join( FusionArena *arena, + + /* Get shared data. */ + if (fusion_arena_get_shared_field( arena, "Core/Shared", (void*)&shared )) +- return DFB_FUSION; ++ return DR_FUSION; + + core->shared = shared; + +@@ -1346,7 +1346,7 @@ fs_core_arena_join( FusionArena *arena, + if (ret) + return ret; + +- return DFB_OK; ++ return DR_OK; + } + + static int +@@ -1354,7 +1354,7 @@ fs_core_arena_leave( FusionArena *arena, + void *ctx, + bool emergency) + { +- DFBResult ret; ++ DirectResult ret; + CoreSound *core = ctx; + + D_DEBUG( "FusionSound/Core: Leaving...\n" ); +@@ -1364,6 +1364,6 @@ fs_core_arena_leave( FusionArena *arena, + if (ret) + return ret; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/src/core/core_sound.h b/src/core/core_sound.h +index 496e710..490c74c 100644 +--- a/src/core/core_sound.h ++++ b/src/core/core_sound.h +@@ -40,8 +40,8 @@ + /* + * Core initialization and deinitialization + */ +-DFBResult fs_core_create ( CoreSound **ret_core ); +-DFBResult fs_core_destroy( CoreSound *core, bool emergency ); ++DirectResult fs_core_create ( CoreSound **ret_core ); ++DirectResult fs_core_destroy( CoreSound *core, bool emergency ); + + /* + * Object creation +@@ -52,12 +52,12 @@ CorePlayback *fs_core_create_playback( CoreSound *core ); + /* + * Object enumeration + */ +-DirectResult fs_core_enum_buffers ( CoreSound *core, +- FusionObjectCallback callback, +- void *ctx ); +-DirectResult fs_core_enum_playbacks ( CoreSound *core, +- FusionObjectCallback callback, +- void *ctx ); ++DirectResult fs_core_enum_buffers ( CoreSound *core, ++ FusionObjectCallback callback, ++ void *ctx ); ++DirectResult fs_core_enum_playbacks ( CoreSound *core, ++ FusionObjectCallback callback, ++ void *ctx ); + + /* + * Playback list management +@@ -65,11 +65,11 @@ DirectResult fs_core_enum_playbacks ( CoreSound *core, + DirectResult fs_core_playlist_lock ( CoreSound *core ); + DirectResult fs_core_playlist_unlock( CoreSound *core ); + +-DFBResult fs_core_add_playback ( CoreSound *core, +- CorePlayback *playback ); ++DirectResult fs_core_add_playback ( CoreSound *core, ++ CorePlayback *playback ); + +-DFBResult fs_core_remove_playback( CoreSound *core, +- CorePlayback *playback ); ++DirectResult fs_core_remove_playback( CoreSound *core, ++ CorePlayback *playback ); + + /* + * Returns the amount of audio data buffered by the device in ms. +@@ -99,32 +99,32 @@ CoreSoundDeviceConfig *fs_core_device_config( CoreSound *core ); + /* + * Returns the master volume. + */ +-DFBResult fs_core_get_master_volume( CoreSound *core, float *level ); ++DirectResult fs_core_get_master_volume( CoreSound *core, float *level ); + + /* + * Sets the master volume. + */ +-DFBResult fs_core_set_master_volume( CoreSound *core, float level ); ++DirectResult fs_core_set_master_volume( CoreSound *core, float level ); + + /* + * Returns the local volume. + */ +-DFBResult fs_core_get_local_volume( CoreSound *core, float *level ); ++DirectResult fs_core_get_local_volume( CoreSound *core, float *level ); + + /* + * Sets the local volume. + */ +-DFBResult fs_core_set_local_volume( CoreSound *core, float level ); ++DirectResult fs_core_set_local_volume( CoreSound *core, float level ); + + /* + * Suspends playback. + */ +-DFBResult fs_core_suspend( CoreSound *core ); ++DirectResult fs_core_suspend( CoreSound *core ); + + /* + * Resumes playback. + */ +-DFBResult fs_core_resume( CoreSound *core ); ++DirectResult fs_core_resume( CoreSound *core ); + + + #endif +diff --git a/src/core/playback.c b/src/core/playback.c +index 5d8a639..a0b0b18 100644 +--- a/src/core/playback.c ++++ b/src/core/playback.c +@@ -97,7 +97,7 @@ fs_playback_pool_create( const FusionWorld *world ) + + /******************************************************************************/ + +-DFBResult ++DirectResult + fs_playback_create( CoreSound *core, + CoreSoundBuffer *buffer, + bool notify, +@@ -115,12 +115,12 @@ fs_playback_create( CoreSound *core, + /* Create playback object. */ + playback = fs_core_create_playback( core ); + if (!playback) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Link buffer to playback object. */ + if (fs_buffer_link( &playback->buffer, buffer )) { + fusion_object_destroy( &playback->object ); +- return DFB_FUSION; ++ return DR_FUSION; + } + + fusion_skirmish_init( &playback->lock, "FusionSound Playback", fs_core_world(core) ); +@@ -151,20 +151,20 @@ fs_playback_create( CoreSound *core, + /* Return playback object. */ + *ret_playback = playback; + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_enable( CorePlayback *playback ) + { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + + D_ASSERT( playback != NULL ); + D_ASSERT( playback->buffer != NULL ); + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Enable playback. */ + playback->disabled = false; +@@ -175,22 +175,22 @@ fs_playback_enable( CorePlayback *playback ) + return ret; + } + +-DFBResult ++DirectResult + fs_playback_start( CorePlayback *playback, bool enable ) + { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + + D_ASSERT( playback != NULL ); + D_ASSERT( playback->buffer != NULL ); + + /* Lock playlist. */ + if (fs_core_playlist_lock( playback->core )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) { + fs_core_playlist_unlock( playback->core ); +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* If the playback is disabled, it won't begin to play. */ +@@ -200,13 +200,13 @@ fs_playback_start( CorePlayback *playback, bool enable ) + /* Start the playback if it's not running already. */ + if (!playback->running) { + if (playback->disabled) { +- ret = DFB_TEMPUNAVAIL; ++ ret = DR_TEMPUNAVAIL; + } + else { + ret = fs_core_add_playback( playback->core, playback ); + + /* Notify listeners about the start of the playback. */ +- if (ret == DFB_OK) ++ if (ret == DR_OK) + fs_playback_notify( playback, CPNF_START, 0 ); + } + } +@@ -220,19 +220,19 @@ fs_playback_start( CorePlayback *playback, bool enable ) + return ret; + } + +-DFBResult ++DirectResult + fs_playback_stop( CorePlayback *playback, bool disable ) + { + D_ASSERT( playback != NULL ); + + /* Lock playlist. */ + if (fs_core_playlist_lock( playback->core )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) { + fs_core_playlist_unlock( playback->core ); +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* Stop the playback if it's running. */ +@@ -253,10 +253,10 @@ fs_playback_stop( CorePlayback *playback, bool disable ) + /* Unlock playlist. */ + fs_core_playlist_unlock( playback->core ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_stop( CorePlayback *playback, + int stop ) + { +@@ -266,7 +266,7 @@ fs_playback_set_stop( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Adjust stop position. */ + playback->stop = stop; +@@ -274,10 +274,10 @@ fs_playback_set_stop( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_position( CorePlayback *playback, + int position ) + { +@@ -288,7 +288,7 @@ fs_playback_set_position( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Adjust the playback position. */ + playback->position = position; +@@ -296,10 +296,10 @@ fs_playback_set_position( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_downmix( CorePlayback *playback, + float center, + float rear ) +@@ -315,7 +315,7 @@ fs_playback_set_downmix( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + buffer = playback->buffer; + config = fs_core_device_config( playback->core ); +@@ -335,10 +335,10 @@ fs_playback_set_downmix( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_volume( CorePlayback *playback, + float levels[6] ) + { +@@ -352,7 +352,7 @@ fs_playback_set_volume( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Adjust volume. */ + for (i = 0; i < 6; i++) +@@ -370,10 +370,10 @@ fs_playback_set_volume( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_local_volume( CorePlayback *playback, + float level ) + { +@@ -383,7 +383,7 @@ fs_playback_set_local_volume( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Set local volume level. */ + playback->volume = fsf_from_float( level ); +@@ -391,10 +391,10 @@ fs_playback_set_local_volume( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_set_pitch( CorePlayback *playback, + int pitch ) + { +@@ -404,7 +404,7 @@ fs_playback_set_pitch( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Adjust pitch. */ + playback->pitch = pitch; +@@ -412,10 +412,10 @@ fs_playback_set_pitch( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_playback_get_status( CorePlayback *playback, + CorePlaybackStatus *ret_status, + int *ret_position ) +@@ -424,7 +424,7 @@ fs_playback_get_status( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + /* Return status. */ + if (ret_status) { +@@ -447,12 +447,12 @@ fs_playback_get_status( CorePlayback *playback, + /* Unlock playback. */ + fusion_skirmish_dismiss( &playback->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + /******************************************************************************/ + +-DFBResult ++DirectResult + fs_playback_mixto( CorePlayback *playback, + __fsf *dest, + int dest_rate, +@@ -461,7 +461,7 @@ fs_playback_mixto( CorePlayback *playback, + __fsf volume, + int *ret_samples) + { +- DFBResult ret; ++ DirectResult ret; + int pos; + int num; + __fsf *levels; +@@ -474,7 +474,7 @@ fs_playback_mixto( CorePlayback *playback, + + /* Lock playback. */ + if (fusion_skirmish_prevail( &playback->lock )) +- return DFB_FUSION; ++ return DR_FUSION; + + if (volume != FSF_ONE || playback->volume != FSF_ONE) { + levels = alloca( 6 * sizeof(__fsf) ); +diff --git a/src/core/playback.h b/src/core/playback.h +index 6c5d05b..33cc652 100644 +--- a/src/core/playback.h ++++ b/src/core/playback.h +@@ -74,47 +74,47 @@ FusionObjectPool *fs_playback_pool_create( const FusionWorld *world ); + FUSION_OBJECT_METHODS( CorePlayback, fs_playback ) + + +-DFBResult fs_playback_create ( CoreSound *core, ++DirectResult fs_playback_create ( CoreSound *core, + CoreSoundBuffer *buffer, + bool notify, + CorePlayback **ret_playback ); + +-DFBResult fs_playback_enable ( CorePlayback *playback ); ++DirectResult fs_playback_enable ( CorePlayback *playback ); + +-DFBResult fs_playback_start ( CorePlayback *playback, ++DirectResult fs_playback_start ( CorePlayback *playback, + bool enable ); + +-DFBResult fs_playback_stop ( CorePlayback *playback, ++DirectResult fs_playback_stop ( CorePlayback *playback, + bool disable ); + +-DFBResult fs_playback_set_stop ( CorePlayback *playback, ++DirectResult fs_playback_set_stop ( CorePlayback *playback, + int stop ); + +-DFBResult fs_playback_set_position( CorePlayback *playback, ++DirectResult fs_playback_set_position( CorePlayback *playback, + int position ); + + /* Must call fs_playback_set_volume() after this. */ +-DFBResult fs_playback_set_downmix ( CorePlayback *playback, ++DirectResult fs_playback_set_downmix ( CorePlayback *playback, + float center, + float rear ); + +-DFBResult fs_playback_set_volume ( CorePlayback *playback, ++DirectResult fs_playback_set_volume ( CorePlayback *playback, + float levels[6] ); + +-DFBResult fs_playback_set_local_volume( CorePlayback *playback, ++DirectResult fs_playback_set_local_volume( CorePlayback *playback, + float level ); + +-DFBResult fs_playback_set_pitch ( CorePlayback *playback, ++DirectResult fs_playback_set_pitch ( CorePlayback *playback, + int pitch ); + +-DFBResult fs_playback_get_status ( CorePlayback *playback, ++DirectResult fs_playback_get_status ( CorePlayback *playback, + CorePlaybackStatus *ret_status, + int *ret_position ); + + /* + * Internally called by core_sound.c in the audio thread. + */ +-DFBResult fs_playback_mixto ( CorePlayback *playback, ++DirectResult fs_playback_mixto ( CorePlayback *playback, + __fsf *dest, + int dest_rate, + FSChannelMode dest_mode, +diff --git a/src/core/sound_buffer.c b/src/core/sound_buffer.c +index e4e2a0d..6fb6829 100644 +--- a/src/core/sound_buffer.c ++++ b/src/core/sound_buffer.c +@@ -66,7 +66,7 @@ fs_buffer_pool_create( const FusionWorld *world ) + + /******************************************************************************/ + +-DFBResult ++DirectResult + fs_buffer_create( CoreSound *core, + int length, + FSChannelMode mode, +@@ -96,12 +96,12 @@ fs_buffer_create( CoreSound *core, + + buffer = fs_core_create_buffer( core ); + if (!buffer) +- return DFB_FUSION; ++ return DR_FUSION; + + buffer->data = SHMALLOC( pool, length * bytes * channels ); + if (!buffer->data) { + fusion_object_destroy( &buffer->object ); +- return DFB_NOSYSTEMMEMORY; ++ return DR_NOLOCALMEMORY; + } + + buffer->length = length; +@@ -115,10 +115,10 @@ fs_buffer_create( CoreSound *core, + + *ret_buffer = buffer; + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_buffer_lock( CoreSoundBuffer *buffer, + int pos, + int length, +@@ -142,17 +142,17 @@ fs_buffer_lock( CoreSoundBuffer *buffer, + *ret_data = buffer->data + buffer->bytes * pos; + *ret_bytes = buffer->bytes * length; + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_buffer_unlock( CoreSoundBuffer *buffer ) + { + D_ASSERT( buffer != NULL ); + + D_DEBUG( "FusionSound/Core: %s (%p)\n", __FUNCTION__, buffer ); + +- return DFB_OK; ++ return DR_OK; + } + + /******************************************************************************/ +@@ -299,7 +299,7 @@ static const SoundMXFunc MIX_RW[FS_NUM_SAMPLEFORMATS][FS_MAX_CHANNELS] = { + }; + + +-DFBResult ++DirectResult + fs_buffer_mixto( CoreSoundBuffer *buffer, + __fsf *dest, + int dest_rate, +@@ -405,6 +405,6 @@ fs_buffer_mixto( CoreSoundBuffer *buffer, + D_DEBUG( "FusionSound/Core: %s ... mixed %d (%d/%d).\n", + __FUNCTION__, ABS(num), len, max_frames ); + +- return last ? DFB_BUFFEREMPTY : DFB_OK; ++ return last ? DR_BUFFEREMPTY : DR_OK; + } + +diff --git a/src/core/sound_buffer.h b/src/core/sound_buffer.h +index e107839..a23dcf7 100644 +--- a/src/core/sound_buffer.h ++++ b/src/core/sound_buffer.h +@@ -75,22 +75,22 @@ FusionObjectPool *fs_buffer_pool_create( const FusionWorld *world ); + FUSION_OBJECT_METHODS( CoreSoundBuffer, fs_buffer ) + + +-DFBResult fs_buffer_create( CoreSound *core, ++DirectResult fs_buffer_create( CoreSound *core, + int length, + FSChannelMode mode, + FSSampleFormat format, + int rate, + CoreSoundBuffer **ret_buffer ); + +-DFBResult fs_buffer_lock ( CoreSoundBuffer *buffer, ++DirectResult fs_buffer_lock ( CoreSoundBuffer *buffer, + int pos, + int length, + void **ret_data, + int *ret_bytes ); + +-DFBResult fs_buffer_unlock( CoreSoundBuffer *buffer ); ++DirectResult fs_buffer_unlock( CoreSoundBuffer *buffer ); + +-DFBResult fs_buffer_mixto ( CoreSoundBuffer *buffer, ++DirectResult fs_buffer_mixto ( CoreSoundBuffer *buffer, + __fsf *dest, + int dest_rate, + FSChannelMode dest_mode, +diff --git a/src/core/sound_device.c b/src/core/sound_device.c +index 3804e44..b841ae6 100644 +--- a/src/core/sound_device.c ++++ b/src/core/sound_device.c +@@ -54,12 +54,12 @@ struct __FS_CoreSoundDevice { + }; + + +-DFBResult ++DirectResult + fs_device_initialize( CoreSound *core, + CoreSoundDeviceConfig *config, + CoreSoundDevice **ret_device ) + { +- DFBResult ret; ++ DirectResult ret; + CoreSoundDevice *device; + DirectLink *link; + +@@ -90,7 +90,7 @@ fs_device_initialize( CoreSound *core, + + if (!device->module && + (!fs_config->driver || !strcmp( module->name, fs_config->driver ))) { +- if (funcs->Probe() == DFB_OK) { ++ if (funcs->Probe() == DR_OK) { + device->module = module; + device->funcs = funcs; + +@@ -112,7 +112,7 @@ fs_device_initialize( CoreSound *core, + } + + D_FREE( device ); +- return DFB_FAILURE; ++ return DR_FAILURE; + } + + if (device->info.device_data_size) { +@@ -146,7 +146,7 @@ fs_device_initialize( CoreSound *core, + + *ret_device = device; + +- return DFB_OK; ++ return DR_OK; + } + + void +@@ -168,7 +168,7 @@ fs_device_get_capabilities( CoreSoundDevice *device ) + return device->device_info.caps; + } + +-DFBResult ++DirectResult + fs_device_get_buffer( CoreSoundDevice *device, + u8 **addr, + unsigned int *avail ) +@@ -180,10 +180,10 @@ fs_device_get_buffer( CoreSoundDevice *device, + if (device->funcs) + return device->funcs->GetBuffer( device->device_data, addr, avail ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-DFBResult ++DirectResult + fs_device_commit_buffer( CoreSoundDevice *device, unsigned int frames ) + { + D_ASSERT( device != NULL ); +@@ -191,7 +191,7 @@ fs_device_commit_buffer( CoreSoundDevice *device, unsigned int frames ) + if (device->funcs) + return device->funcs->CommitBuffer( device->device_data, frames ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + + void +@@ -206,7 +206,7 @@ fs_device_get_output_delay( CoreSoundDevice *device, int *delay ) + *delay = 0; + } + +-DFBResult ++DirectResult + fs_device_get_volume( CoreSoundDevice *device, float *level ) + { + D_ASSERT( device != NULL ); +@@ -215,10 +215,10 @@ fs_device_get_volume( CoreSoundDevice *device, float *level ) + if (device->funcs) + return device->funcs->GetVolume( device->device_data, level ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-DFBResult ++DirectResult + fs_device_set_volume( CoreSoundDevice *device, float level ) + { + D_ASSERT( device != NULL ); +@@ -226,10 +226,10 @@ fs_device_set_volume( CoreSoundDevice *device, float level ) + if (device->funcs) + return device->funcs->SetVolume( device->device_data, level ); + +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + } + +-DFBResult ++DirectResult + fs_device_suspend( CoreSoundDevice *device ) + { + D_ASSERT( device != NULL ); +@@ -237,10 +237,10 @@ fs_device_suspend( CoreSoundDevice *device ) + if (device->funcs) + return device->funcs->Suspend( device->device_data ); + +- return DFB_OK; ++ return DR_OK; + } + +-DFBResult ++DirectResult + fs_device_resume( CoreSoundDevice *device ) + { + D_ASSERT( device != NULL ); +@@ -248,7 +248,7 @@ fs_device_resume( CoreSoundDevice *device ) + if (device->funcs) + return device->funcs->Resume( device->device_data ); + +- return DFB_OK; ++ return DR_OK; + } + + void +diff --git a/src/core/sound_device.h b/src/core/sound_device.h +index 60a6f5f..9d7d9a2 100644 +--- a/src/core/sound_device.h ++++ b/src/core/sound_device.h +@@ -94,23 +94,23 @@ typedef struct { + + /* Device funcs. */ + typedef struct { +- DFBResult (*Probe) ( void ); ++ DirectResult (*Probe) ( void ); + + /* Get device driver information. */ + void (*GetDriverInfo) ( SoundDriverInfo *info); + + /* Open the device, get device information and apply given configuration. */ +- DFBResult (*OpenDevice) ( void *device_data, ++ DirectResult (*OpenDevice) ( void *device_data, + SoundDeviceInfo *device_info, + CoreSoundDeviceConfig *config ); + + /* Begin access to the ring buffer, return buffer pointer and available frames. */ +- DFBResult (*GetBuffer) ( void *device_data, ++ DirectResult (*GetBuffer) ( void *device_data, + u8 **addr, + unsigned int *avail ); + + /* Finish access to the ring buffer, commit specified amout of frames. */ +- DFBResult (*CommitBuffer) ( void *device_data, ++ DirectResult (*CommitBuffer) ( void *device_data, + unsigned int frames ); + + /* Get output delay in frames. */ +@@ -118,25 +118,25 @@ typedef struct { + int *delay ); + + /* Get volume level */ +- DFBResult (*GetVolume) ( void *device_data, ++ DirectResult (*GetVolume) ( void *device_data, + float *level ); + + /* Set volume level */ +- DFBResult (*SetVolume) ( void *device_data, ++ DirectResult (*SetVolume) ( void *device_data, + float level ); + + /* Suspend the device */ +- DFBResult (*Suspend) ( void *device_data ); ++ DirectResult (*Suspend) ( void *device_data ); + + /* Resume the device */ +- DFBResult (*Resume) ( void *device_data ); ++ DirectResult (*Resume) ( void *device_data ); + + /* Close device. */ + void (*CloseDevice) ( void *device_data ); + } SoundDriverFuncs; + + +-DFBResult fs_device_initialize( CoreSound *core, ++DirectResult fs_device_initialize( CoreSound *core, + CoreSoundDeviceConfig *config, + CoreSoundDevice **ret_device ); + void fs_device_shutdown ( CoreSoundDevice *device ); +@@ -147,20 +147,20 @@ void fs_device_get_description( CoreSoundDevice *device, + DeviceCapabilities + fs_device_get_capabilities( CoreSoundDevice *device ); + +-DFBResult fs_device_get_buffer( CoreSoundDevice *device, ++DirectResult fs_device_get_buffer( CoreSoundDevice *device, + u8 **addr, + unsigned int *avail ); + +-DFBResult fs_device_commit_buffer( CoreSoundDevice *device, unsigned int frames ); ++DirectResult fs_device_commit_buffer( CoreSoundDevice *device, unsigned int frames ); + + void fs_device_get_output_delay( CoreSoundDevice *device, int *delay ); + +-DFBResult fs_device_get_volume( CoreSoundDevice *device, float *level ); ++DirectResult fs_device_get_volume( CoreSoundDevice *device, float *level ); + +-DFBResult fs_device_set_volume( CoreSoundDevice *device, float level ); ++DirectResult fs_device_set_volume( CoreSoundDevice *device, float level ); + +-DFBResult fs_device_suspend( CoreSoundDevice *device ); ++DirectResult fs_device_suspend( CoreSoundDevice *device ); + +-DFBResult fs_device_resume( CoreSoundDevice *device ); ++DirectResult fs_device_resume( CoreSoundDevice *device ); + + #endif +diff --git a/src/core/sound_driver.h b/src/core/sound_driver.h +index 664ea80..49eb1e0 100644 +--- a/src/core/sound_driver.h ++++ b/src/core/sound_driver.h +@@ -33,39 +33,39 @@ + #include + + +-static DFBResult ++static DirectResult + device_probe( void ); + + static void + device_get_driver_info( SoundDriverInfo *info ); + +-static DFBResult ++static DirectResult + device_open( void *device_data, + SoundDeviceInfo *device_info, + CoreSoundDeviceConfig *config ); + +-static DFBResult ++static DirectResult + device_get_buffer( void *device_data, + u8 **addr, + unsigned int *avail ); + +-static DFBResult ++static DirectResult + device_commit_buffer( void *device_data, + unsigned int frames ); + + static void + device_get_output_delay( void *device_data, int *delay ); + +-static DFBResult ++static DirectResult + device_get_volume( void *device_data, float *level ); + +-static DFBResult ++static DirectResult + device_set_volume( void *device_data, float level ); + +-static DFBResult ++static DirectResult + device_suspend( void *device_data ); + +-static DFBResult ++static DirectResult + device_resume( void *device_data ); + + static void +diff --git a/src/fusionsound.c b/src/fusionsound.c +index 323b458..0cafa44 100644 +--- a/src/fusionsound.c ++++ b/src/fusionsound.c +@@ -49,7 +49,7 @@ IFusionSound *ifusionsound_singleton = NULL; + + /**************************************************************************************************/ + +-static DFBResult CreateRemote( const char *host, ++static DirectResult CreateRemote( const char *host, + int session, + IFusionSound **ret_interface ); + +@@ -91,27 +91,27 @@ FusionSoundUsageString( void ) + return fs_config_usage(); + } + +-DFBResult ++DirectResult + FusionSoundInit( int *argc, char **argv[] ) + { + return fs_config_init( argc, argv ); + } + +-DFBResult ++DirectResult + FusionSoundSetOption( const char *name, const char *value ) + { + if (fs_config == NULL) { + D_ERROR( "FusionSoundSetOption: FusionSoundInit has to be called first!\n" ); +- return DFB_INIT; ++ return DR_INIT; + } + + if (ifusionsound_singleton) { + D_ERROR( "FusionSoundSetOption: FusionSoundCreate has already been called!\n" ); +- return DFB_INIT; ++ return DR_INIT; + } + + if (!name) +- return DFB_INVARG; ++ return DR_INVARG; + + return fs_config_set( name, value ); + } +@@ -119,20 +119,20 @@ FusionSoundSetOption( const char *name, const char *value ) + DirectResult + FusionSoundCreate( IFusionSound **ret_interface ) + { +- DFBResult ret; ++ DirectResult ret; + + if (!fs_config) { + D_ERROR( "FusionSoundCreate: FusionSoundInit has to be called first!\n" ); +- return DFB_INIT; ++ return DR_INIT; + } + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + if (ifusionsound_singleton) { + ifusionsound_singleton->AddRef( ifusionsound_singleton ); + *ret_interface = ifusionsound_singleton; +- return DFB_OK; ++ return DR_OK; + } + + if (!direct_config->quiet && fs_config->banner) { +@@ -152,7 +152,7 @@ FusionSoundCreate( IFusionSound **ret_interface ) + DIRECT_ALLOCATE_INTERFACE( ifusionsound_singleton, IFusionSound ); + + ret = IFusionSound_Construct( ifusionsound_singleton ); +- if (ret != DFB_OK) ++ if (ret != DR_OK) + ifusionsound_singleton = NULL; + + *ret_interface = ifusionsound_singleton; +@@ -171,7 +171,7 @@ FusionSoundError( const char *msg, DirectResult error ) + return error; + } + +-DFBResult ++DirectResult + FusionSoundErrorFatal( const char *msg, DirectResult error ) + { + FusionSoundError( msg, error ); +@@ -187,10 +187,10 @@ FusionSoundErrorString( DirectResult error ) + + /**************************************************************************************************/ + +-static DFBResult ++static DirectResult + CreateRemote( const char *host, int session, IFusionSound **ret_interface ) + { +- DFBResult ret; ++ DirectResult ret; + DirectInterfaceFuncs *funcs; + void *interface; + +@@ -211,5 +211,5 @@ CreateRemote( const char *host, int session, IFusionSound **ret_interface ) + + *ret_interface = interface; + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/src/ifusionsound.c b/src/ifusionsound.c +index 7822980..435d30c 100644 +--- a/src/ifusionsound.c ++++ b/src/ifusionsound.c +@@ -62,17 +62,17 @@ IFusionSound_Destruct( IFusionSound *thiz ) + ifusionsound_singleton = NULL; + } + +-static DFBResult ++static DirectResult + IFusionSound_AddRef( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_Release( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound) +@@ -80,29 +80,29 @@ IFusionSound_Release( IFusionSound *thiz ) + if (--data->ref == 0) + IFusionSound_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_GetDeviceDescription( IFusionSound *thiz, + FSDeviceDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + *desc = *fs_core_device_description( data->core ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSound_CreateBuffer( IFusionSound *thiz, + const FSBufferDescription *desc, + IFusionSoundBuffer **ret_interface ) + { +- DFBResult ret; ++ DirectResult ret; + CoreSoundDeviceConfig *config; + FSChannelMode mode; + FSSampleFormat format; +@@ -115,7 +115,7 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound) + + if (!desc || !ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + config = fs_core_device_config( data->core ); + mode = config->mode; +@@ -126,7 +126,7 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + flags = desc->flags; + + if (flags & ~FSBDF_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + + if (flags & FSBDF_CHANNELMODE) { +@@ -150,7 +150,7 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (flags & FSBDF_CHANNELS) { +@@ -160,7 +160,7 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + +@@ -175,13 +175,13 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + + if (flags & FSBDF_SAMPLERATE) { + if (desc->samplerate < 100) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + rate = desc->samplerate; + } + +@@ -189,10 +189,10 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + length = desc->length; + + if (length < 1) +- return DFB_INVARG; ++ return DR_INVARG; + + if (length > FS_MAX_FRAMES) +- return DFB_LIMITEXCEEDED; ++ return DR_LIMITEXCEEDED; + + ret = fs_buffer_create( data->core, length, mode, format, rate, &buffer ); + if (ret) +@@ -210,12 +210,12 @@ IFusionSound_CreateBuffer( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_CreateStream( IFusionSound *thiz, + const FSStreamDescription *desc, + IFusionSoundStream **ret_interface ) + { +- DFBResult ret; ++ DirectResult ret; + CoreSoundDeviceConfig *config; + FSChannelMode mode; + FSSampleFormat format; +@@ -229,7 +229,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSound) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + config = fs_core_device_config( data->core ); + mode = config->mode; +@@ -242,7 +242,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + flags = desc->flags; + + if (flags & ~FSSDF_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + if (flags & FSSDF_CHANNELMODE) { + switch (desc->channelmode) { +@@ -265,7 +265,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (flags & FSSDF_CHANNELS) { +@@ -275,7 +275,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + +@@ -290,25 +290,25 @@ IFusionSound_CreateStream( IFusionSound *thiz, + break; + + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + } + + if (flags & FSSDF_SAMPLERATE) { + if (desc->samplerate < 100) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + rate = desc->samplerate; + } + + if (flags & FSSDF_BUFFERSIZE) { + if (desc->buffersize < 1) +- return DFB_INVARG; ++ return DR_INVARG; + size = desc->buffersize; + } + + if (flags & FSSDF_PREBUFFER) { + if (desc->prebuffer >= size) +- return DFB_INVARG; ++ return DR_INVARG; + prebuffer = desc->prebuffer; + } + } +@@ -318,7 +318,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + + /* Limit ring buffer size to five seconds. */ + if (size > rate * 5) +- return DFB_LIMITEXCEEDED; ++ return DR_LIMITEXCEEDED; + + ret = fs_buffer_create( data->core, size, mode, format, rate, &buffer ); + if (ret) +@@ -336,7 +336,7 @@ IFusionSound_CreateStream( IFusionSound *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSound_CreateMusicProvider( IFusionSound *thiz, + const char *filename, + IFusionSoundMusicProvider **ret_interface ) +@@ -345,12 +345,12 @@ IFusionSound_CreateMusicProvider( IFusionSound *thiz, + + /* Check arguments */ + if (!ret_interface || !filename) +- return DFB_INVARG; ++ return DR_INVARG; + + return IFusionSoundMusicProvider_Create( filename, ret_interface ); + } + +-static DFBResult ++static DirectResult + IFusionSound_GetMasterVolume( IFusionSound *thiz, + float *level ) + { +@@ -358,12 +358,12 @@ IFusionSound_GetMasterVolume( IFusionSound *thiz, + + /* Check arguments */ + if (!level) +- return DFB_INVARG; ++ return DR_INVARG; + + return fs_core_get_master_volume( data->core, level ); + } + +-static DFBResult ++static DirectResult + IFusionSound_SetMasterVolume( IFusionSound *thiz, + float level ) + { +@@ -371,12 +371,12 @@ IFusionSound_SetMasterVolume( IFusionSound *thiz, + + /* Check arguments */ + if (level < 0.0f || level > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + return fs_core_set_master_volume( data->core, level ); + } + +-static DFBResult ++static DirectResult + IFusionSound_GetLocalVolume( IFusionSound *thiz, + float *level ) + { +@@ -384,12 +384,12 @@ IFusionSound_GetLocalVolume( IFusionSound *thiz, + + /* Check arguments */ + if (!level) +- return DFB_INVARG; ++ return DR_INVARG; + + return fs_core_get_local_volume( data->core, level ); + } + +-static DFBResult ++static DirectResult + IFusionSound_SetLocalVolume( IFusionSound *thiz, + float level ) + { +@@ -397,12 +397,12 @@ IFusionSound_SetLocalVolume( IFusionSound *thiz, + + /* Check arguments */ + if (level < 0.0f || level > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + return fs_core_set_local_volume( data->core, level ); + } + +-static DFBResult ++static DirectResult + IFusionSound_Suspend( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound) +@@ -410,7 +410,7 @@ IFusionSound_Suspend( IFusionSound *thiz ) + return fs_core_suspend( data->core ); + } + +-static DFBResult ++static DirectResult + IFusionSound_Resume( IFusionSound *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSound) +@@ -419,10 +419,10 @@ IFusionSound_Resume( IFusionSound *thiz ) + } + + +-DFBResult ++DirectResult + IFusionSound_Construct( IFusionSound *thiz ) + { +- DFBResult ret; ++ DirectResult ret; + + /* Allocate interface data. */ + DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IFusionSound ); +@@ -454,5 +454,5 @@ IFusionSound_Construct( IFusionSound *thiz ) + thiz->Suspend = IFusionSound_Suspend; + thiz->Resume = IFusionSound_Resume; + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/src/ifusionsound.h b/src/ifusionsound.h +index d7c91cc..f19c3e0 100644 +--- a/src/ifusionsound.h ++++ b/src/ifusionsound.h +@@ -42,7 +42,7 @@ typedef struct { + } IFusionSound_data; + + +-DFBResult IFusionSound_Construct( IFusionSound *thiz ); ++DirectResult IFusionSound_Construct( IFusionSound *thiz ); + + extern IFusionSound *ifusionsound_singleton; + +diff --git a/src/ifusionsoundbuffer.c b/src/ifusionsoundbuffer.c +index 6cf3a58..d5047e6 100644 +--- a/src/ifusionsoundbuffer.c ++++ b/src/ifusionsoundbuffer.c +@@ -87,17 +87,17 @@ IFusionSoundBuffer_Destruct( IFusionSoundBuffer *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_AddRef( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Release( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) +@@ -105,18 +105,18 @@ IFusionSoundBuffer_Release( IFusionSoundBuffer *thiz ) + if (--data->ref == 0) + IFusionSoundBuffer_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_GetDescription( IFusionSoundBuffer *thiz, + FSBufferDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_CHANNELS | FSBDF_LENGTH | + FSBDF_SAMPLEFORMAT | FSBDF_SAMPLERATE | +@@ -128,40 +128,40 @@ IFusionSoundBuffer_GetDescription( IFusionSoundBuffer *thiz, + desc->samplerate = data->rate; + desc->channelmode = data->mode; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_SetPosition( IFusionSoundBuffer *thiz, + int position ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (position < 0 || position >= data->size) +- return DFB_INVARG; ++ return DR_INVARG; + + data->pos = position; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Lock( IFusionSoundBuffer *thiz, + void **ret_data, + int *ret_frames, + int *ret_bytes ) + { +- DFBResult ret; ++ DirectResult ret; + void *lock_data; + int lock_bytes; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (!ret_data) +- return DFB_INVARG; ++ return DR_INVARG; + + if (data->locked) +- return DFB_LOCKED; ++ return DR_LOCKED; + + ret = fs_buffer_lock( data->buffer, data->pos, 0, &lock_data, &lock_bytes ); + if (ret) +@@ -177,35 +177,35 @@ IFusionSoundBuffer_Lock( IFusionSoundBuffer *thiz, + if (ret_bytes) + *ret_bytes = lock_bytes; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Unlock( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (!data->locked) +- return DFB_OK; ++ return DR_OK; + + fs_buffer_unlock( data->buffer ); + + data->locked = false; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Play( IFusionSoundBuffer *thiz, + FSBufferPlayFlags flags ) + { +- DFBResult ret; ++ DirectResult ret; + CorePlayback *playback; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (flags & ~FSPLAY_ALL) +- return DFB_INVARG; ++ return DR_INVARG; + + /* Choose looping playback mode. */ + if (flags & FSPLAY_LOOPING) { +@@ -214,7 +214,7 @@ IFusionSoundBuffer_Play( IFusionSoundBuffer *thiz, + /* Return error if already running a looping playing. */ + if (data->looping) { + pthread_mutex_unlock( &data->lock ); +- return DFB_BUSY; ++ return DR_BUSY; + } + + /* Create a playback object. */ +@@ -285,7 +285,7 @@ IFusionSoundBuffer_Play( IFusionSoundBuffer *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_Stop( IFusionSoundBuffer *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) +@@ -302,21 +302,21 @@ IFusionSoundBuffer_Stop( IFusionSoundBuffer *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundBuffer_CreatePlayback( IFusionSoundBuffer *thiz, + IFusionSoundPlayback **ret_interface ) + { +- DFBResult ret; ++ DirectResult ret; + CorePlayback *playback; + IFusionSoundPlayback *interface; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundBuffer) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = fs_playback_create( data->core, data->buffer, true, &playback ); + if (ret) +@@ -338,7 +338,7 @@ IFusionSoundBuffer_CreatePlayback( IFusionSoundBuffer *thiz, + + /******/ + +-DFBResult ++DirectResult + IFusionSoundBuffer_Construct( IFusionSoundBuffer *thiz, + CoreSound *core, + CoreSoundBuffer *buffer, +@@ -353,7 +353,7 @@ IFusionSoundBuffer_Construct( IFusionSoundBuffer *thiz, + if (fs_buffer_ref( buffer )) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* Initialize private data. */ +@@ -383,6 +383,6 @@ IFusionSoundBuffer_Construct( IFusionSoundBuffer *thiz, + + thiz->CreatePlayback = IFusionSoundBuffer_CreatePlayback; + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/src/ifusionsoundbuffer.h b/src/ifusionsoundbuffer.h +index ee19b42..f0c4070 100644 +--- a/src/ifusionsoundbuffer.h ++++ b/src/ifusionsoundbuffer.h +@@ -34,7 +34,7 @@ + /* + * initializes interface struct and private data + */ +-DFBResult IFusionSoundBuffer_Construct( IFusionSoundBuffer *thiz, ++DirectResult IFusionSoundBuffer_Construct( IFusionSoundBuffer *thiz, + CoreSound *core, + CoreSoundBuffer *buffer, + int size, +diff --git a/src/ifusionsoundplayback.c b/src/ifusionsoundplayback.c +index 3729ddf..12f9adb 100644 +--- a/src/ifusionsoundplayback.c ++++ b/src/ifusionsoundplayback.c +@@ -63,7 +63,7 @@ typedef struct { + static ReactionResult IFusionSoundPlayback_React( const void *msg_data, + void *ctx ); + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_UpdateVolume( IFusionSoundPlayback_data* data ); + + /******/ +@@ -88,17 +88,17 @@ IFusionSoundPlayback_Destruct( IFusionSoundPlayback *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_AddRef( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Release( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) +@@ -106,10 +106,10 @@ IFusionSoundPlayback_Release( IFusionSoundPlayback *thiz ) + if (--data->ref == 0) + IFusionSoundPlayback_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Start( IFusionSoundPlayback *thiz, + int start, + int stop ) +@@ -120,13 +120,13 @@ IFusionSoundPlayback_Start( IFusionSoundPlayback *thiz, + __FUNCTION__, data->playback, start, stop ); + + if (data->stream) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + if (start < 0 || start >= data->length) +- return DFB_INVARG; ++ return DR_INVARG; + + if (stop >= data->length) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -136,10 +136,10 @@ IFusionSoundPlayback_Start( IFusionSoundPlayback *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Stop( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) +@@ -149,7 +149,7 @@ IFusionSoundPlayback_Stop( IFusionSoundPlayback *thiz ) + return fs_playback_stop( data->playback, false ); + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Continue( IFusionSoundPlayback *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) +@@ -159,10 +159,10 @@ IFusionSoundPlayback_Continue( IFusionSoundPlayback *thiz ) + return fs_playback_start( data->playback, false ); + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_Wait( IFusionSoundPlayback *thiz ) + { +- DFBResult ret; ++ DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) + +@@ -179,7 +179,7 @@ IFusionSoundPlayback_Wait( IFusionSoundPlayback *thiz ) + + if (status & CPS_PLAYING) { + if (status & CPS_LOOPING) { +- ret = DFB_UNSUPPORTED; ++ ret = DR_UNSUPPORTED; + break; + } + else { +@@ -197,12 +197,12 @@ IFusionSoundPlayback_Wait( IFusionSoundPlayback *thiz ) + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_GetStatus( IFusionSoundPlayback *thiz, +- DFBBoolean *ret_playing, ++ bool *ret_playing, + int *ret_position ) + { +- DFBResult ret; ++ DirectResult ret; + CorePlaybackStatus status; + int position; + +@@ -215,15 +215,15 @@ IFusionSoundPlayback_GetStatus( IFusionSoundPlayback *thiz, + return ret; + + if (ret_playing) +- *ret_playing = (status & CPS_PLAYING) ? DFB_TRUE : DFB_FALSE; ++ *ret_playing = !!(status & CPS_PLAYING); + + if (ret_position) + *ret_position = position; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_SetVolume( IFusionSoundPlayback *thiz, + float level ) + { +@@ -232,17 +232,17 @@ IFusionSoundPlayback_SetVolume( IFusionSoundPlayback *thiz, + D_DEBUG( "%s (%p, %.3f)\n", __FUNCTION__, data->playback, level ); + + if (level < 0.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + if (level > 64.0f) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->volume = level; + + return IFusionSoundPlayback_UpdateVolume( data ); + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_SetPan( IFusionSoundPlayback *thiz, + float value ) + { +@@ -251,14 +251,14 @@ IFusionSoundPlayback_SetPan( IFusionSoundPlayback *thiz, + D_DEBUG( "%s (%p, %.3f)\n", __FUNCTION__, data->playback, value ); + + if (value < -1.0f || value > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + data->pan = value; + + return IFusionSoundPlayback_UpdateVolume( data ); + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_SetPitch( IFusionSoundPlayback *thiz, + float value ) + { +@@ -267,19 +267,19 @@ IFusionSoundPlayback_SetPitch( IFusionSoundPlayback *thiz, + D_DEBUG( "%s (%p, %.3f)\n", __FUNCTION__, data->playback, value ); + + if (value < 0.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + if (value > 64.0f) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + + data->pitch = (value * FS_PITCH_ONE + 0.5f); + + fs_playback_set_pitch( data->playback, data->pitch*data->dir ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_SetDirection( IFusionSoundPlayback *thiz, + FSPlaybackDirection direction ) + { +@@ -293,30 +293,30 @@ IFusionSoundPlayback_SetDirection( IFusionSoundPlayback *thiz, + data->dir = direction; + break; + default: +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_playback_set_pitch( data->playback, data->pitch*data->dir ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_SetDownmixLevels( IFusionSoundPlayback *thiz, + float center, + float rear ) + { +- DFBResult ret; ++ DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback) + + D_DEBUG( "%s (%p, %.3f, %.3f)\n", __FUNCTION__, data->playback, center, rear ); + + if (center < 0.0f || center > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + if (rear < 0.0f || rear > 1.0f) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = fs_playback_set_downmix( data->playback, center, rear ); + if (ret) +@@ -327,7 +327,7 @@ IFusionSoundPlayback_SetDownmixLevels( IFusionSoundPlayback *thiz, + + /******/ + +-DFBResult ++DirectResult + IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, + CorePlayback *playback, + int length ) +@@ -338,7 +338,7 @@ IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, + if (fs_playback_ref( playback )) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* Attach our listener to the playback. */ +@@ -349,7 +349,7 @@ IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, + + DIRECT_DEALLOCATE_INTERFACE( thiz ); + +- return DFB_FUSION; ++ return DR_FUSION; + } + + /* Initialize private data. */ +@@ -382,7 +382,7 @@ IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, + thiz->SetDirection = IFusionSoundPlayback_SetDirection; + thiz->SetDownmixLevels = IFusionSoundPlayback_SetDownmixLevels; + +- return DFB_OK; ++ return DR_OK; + } + + /******/ +@@ -410,7 +410,7 @@ IFusionSoundPlayback_React( const void *msg_data, + return RS_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundPlayback_UpdateVolume( IFusionSoundPlayback_data* data ) + { + /* L R C Rl Rr LFE */ +diff --git a/src/ifusionsoundplayback.h b/src/ifusionsoundplayback.h +index db97441..90292d1 100644 +--- a/src/ifusionsoundplayback.h ++++ b/src/ifusionsoundplayback.h +@@ -34,7 +34,7 @@ + /* + * initializes interface struct and private data + */ +-DFBResult IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, ++DirectResult IFusionSoundPlayback_Construct( IFusionSoundPlayback *thiz, + CorePlayback *playback, + int length ); + +diff --git a/src/ifusionsoundstream.c b/src/ifusionsoundstream.c +index 2ba94a9..6f9d987 100644 +--- a/src/ifusionsoundstream.c ++++ b/src/ifusionsoundstream.c +@@ -46,7 +46,7 @@ + + /******/ + +-static DFBResult IFusionSoundStream_FillBuffer( IFusionSoundStream_data *data, ++static DirectResult IFusionSoundStream_FillBuffer( IFusionSoundStream_data *data, + const void *sample_data, + int length, + int *ret_bytes ); +@@ -81,17 +81,17 @@ IFusionSoundStream_Destruct( IFusionSoundStream *thiz ) + DIRECT_DEALLOCATE_INTERFACE( thiz ); + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_AddRef( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + data->ref++; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Release( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) +@@ -99,18 +99,18 @@ IFusionSoundStream_Release( IFusionSoundStream *thiz ) + if (--data->ref == 0) + IFusionSoundStream_Destruct( thiz ); + +- return DFB_OK; ++ return DR_OK; + } + + +-static DFBResult ++static DirectResult + IFusionSoundStream_GetDescription( IFusionSoundStream *thiz, + FSStreamDescription *desc ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_BUFFERSIZE | FSSDF_CHANNELS | + FSSDF_SAMPLEFORMAT | FSSDF_SAMPLERATE | +@@ -122,10 +122,10 @@ IFusionSoundStream_GetDescription( IFusionSoundStream *thiz, + desc->prebuffer = data->prebuffer; + desc->channelmode = data->mode; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Write( IFusionSoundStream *thiz, + const void *sample_data, + int length ) +@@ -133,14 +133,14 @@ IFusionSoundStream_Write( IFusionSoundStream *thiz, + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (!sample_data || length < 1) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + + data->pending = length; + + while (data->pending) { +- DFBResult ret; ++ DirectResult ret; + int num; + int bytes; + +@@ -159,7 +159,7 @@ IFusionSoundStream_Write( IFusionSoundStream *thiz, + /* Drop could have been called while waiting */ + if (!data->pending) { + pthread_mutex_unlock( &data->lock ); +- return DFB_OK; ++ return DR_OK; + } + } + +@@ -193,17 +193,17 @@ IFusionSoundStream_Write( IFusionSoundStream *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Wait( IFusionSoundStream *thiz, + int length ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (length < 0 || length > data->size) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -227,16 +227,16 @@ IFusionSoundStream_Wait( IFusionSoundStream *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_GetStatus( IFusionSoundStream *thiz, + int *filled, + int *total, + int *read_position, + int *write_position, +- DFBBoolean *playing ) ++ bool *playing ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + +@@ -259,10 +259,10 @@ IFusionSoundStream_GetStatus( IFusionSoundStream *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Flush( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) +@@ -284,10 +284,10 @@ IFusionSoundStream_Flush( IFusionSoundStream *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Drop( IFusionSoundStream *thiz ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) +@@ -302,17 +302,17 @@ IFusionSoundStream_Drop( IFusionSoundStream *thiz ) + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_GetPresentationDelay( IFusionSoundStream *thiz, + int *delay ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (!delay) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -321,21 +321,21 @@ IFusionSoundStream_GetPresentationDelay( IFusionSoundStream *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_GetPlayback( IFusionSoundStream *thiz, + IFusionSoundPlayback **ret_interface ) + { + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (!ret_interface) +- return DFB_INVARG; ++ return DR_INVARG; + + if (!data->iplayback) { + IFusionSoundPlayback *interface; +- DFBResult ret; ++ DirectResult ret; + + DIRECT_ALLOCATE_INTERFACE( interface, IFusionSoundPlayback ); + +@@ -352,22 +352,22 @@ IFusionSoundStream_GetPlayback( IFusionSoundStream *thiz, + + *ret_interface = data->iplayback; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Access( IFusionSoundStream *thiz, + void **ret_data, + int *ret_avail ) + { +- DFBResult ret; ++ DirectResult ret; + int num; + int bytes; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (!ret_data || !ret_avail) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + +@@ -398,22 +398,22 @@ IFusionSoundStream_Access( IFusionSoundStream *thiz, + return ret; + } + +-static DFBResult ++static DirectResult + IFusionSoundStream_Commit( IFusionSoundStream *thiz, + int length ) + { +- DFBResult ret; ++ DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundStream) + + if (length < 0) +- return DFB_INVARG; ++ return DR_INVARG; + + pthread_mutex_lock( &data->lock ); + + if (length > data->size - data->filled) { + pthread_mutex_unlock( &data->lock ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + D_DEBUG( "%s: length %d, filled %d/%d (%splaying)\n", +@@ -453,13 +453,13 @@ IFusionSoundStream_Commit( IFusionSoundStream *thiz, + + pthread_mutex_unlock( &data->lock ); + +- return DFB_OK; ++ return DR_OK; + } + + + /******/ + +-DFBResult ++DirectResult + IFusionSoundStream_Construct( IFusionSoundStream *thiz, + CoreSound *core, + CoreSoundBuffer *buffer, +@@ -469,14 +469,14 @@ IFusionSoundStream_Construct( IFusionSoundStream *thiz, + int rate, + int prebuffer ) + { +- DFBResult ret; ++ DirectResult ret; + CorePlayback *playback; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IFusionSoundStream) + + /* Increase reference counter of the buffer. */ + if (fs_buffer_ref( buffer )) { +- ret = DFB_FUSION; ++ ret = DR_FUSION; + goto error_ref; + } + +@@ -487,7 +487,7 @@ IFusionSoundStream_Construct( IFusionSoundStream *thiz, + + /* Attach our listener to the playback object. */ + if (fs_playback_attach( playback, IFusionSoundStream_React, data, &data->reaction )) { +- ret = DFB_FUSION; ++ ret = DR_FUSION; + goto error_attach; + } + +@@ -528,7 +528,7 @@ IFusionSoundStream_Construct( IFusionSoundStream *thiz, + thiz->Access = IFusionSoundStream_Access; + thiz->Commit = IFusionSoundStream_Commit; + +- return DFB_OK; ++ return DR_OK; + + error_attach: + fs_playback_unref( playback ); +@@ -544,13 +544,13 @@ error_ref: + + /******/ + +-static DFBResult ++static DirectResult + IFusionSoundStream_FillBuffer( IFusionSoundStream_data *data, + const void *sample_data, + int length, + int *ret_bytes ) + { +- DFBResult ret; ++ DirectResult ret; + void *lock_data; + int lock_bytes; + int offset = 0; +@@ -597,7 +597,7 @@ IFusionSoundStream_FillBuffer( IFusionSoundStream_data *data, + if (ret_bytes) + *ret_bytes = offset; + +- return DFB_OK; ++ return DR_OK; + } + + static ReactionResult +diff --git a/src/ifusionsoundstream.h b/src/ifusionsoundstream.h +index eb3c193..fd43aff 100644 +--- a/src/ifusionsoundstream.h ++++ b/src/ifusionsoundstream.h +@@ -62,7 +62,7 @@ typedef struct { + /* + * initializes interface struct and private data + */ +-DFBResult IFusionSoundStream_Construct( IFusionSoundStream *thiz, ++DirectResult IFusionSoundStream_Construct( IFusionSoundStream *thiz, + CoreSound *core, + CoreSoundBuffer *buffer, + int size, +diff --git a/src/media/ifusionsoundmusicprovider.c b/src/media/ifusionsoundmusicprovider.c +index af87e05..9ea5c26 100644 +--- a/src/media/ifusionsoundmusicprovider.c ++++ b/src/media/ifusionsoundmusicprovider.c +@@ -38,40 +38,40 @@ + #include + + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_AddRef( IFusionSoundMusicProvider *thiz ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Release( IFusionSoundMusicProvider *thiz ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetCapabilities( IFusionSoundMusicProvider *thiz, + FSMusicProviderCapabilities *caps ) + { + if (!caps) +- return DFB_INVARG; ++ return DR_INVARG; + + *caps = FMCAPS_BASIC; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_EnumTracks( IFusionSoundMusicProvider *thiz, + FSTrackCallback callback, + void *callbackdata ) + { + FSTrackDescription desc; +- DFBResult ret; ++ DirectResult ret; + + if (!callback) +- return DFB_INVARG; ++ return DR_INVARG; + + ret = thiz->GetTrackDescription( thiz, &desc ); + if (ret) +@@ -79,145 +79,145 @@ IFusionSoundMusicProvider_EnumTracks( IFusionSoundMusicProvider *thiz, + + callback( 0, desc, callbackdata ); + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetTrackID( IFusionSoundMusicProvider *thiz, + FSTrackID *ret_track_id ) + { + if (!ret_track_id) +- return DFB_INVARG; ++ return DR_INVARG; + + *ret_track_id = 0; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetTrackDescription( IFusionSoundMusicProvider *thiz, + FSTrackDescription *desc ) + { + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + memset( desc, 0, sizeof(FSTrackDescription) ); + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetStreamDescription( IFusionSoundMusicProvider *thiz, + FSStreamDescription *desc ) + { + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSSDF_NONE; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetBufferDescription( IFusionSoundMusicProvider *thiz, + FSBufferDescription *desc ) + { + if (!desc) +- return DFB_INVARG; ++ return DR_INVARG; + + desc->flags = FSBDF_NONE; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_SelectTrack( IFusionSoundMusicProvider *thiz, + FSTrackID track_id ) + { + if (track_id != 0) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_PlayToStream( IFusionSoundMusicProvider *thiz, + IFusionSoundStream *destination ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_PlayToBuffer( IFusionSoundMusicProvider *thiz, + IFusionSoundBuffer *destination, + FMBufferCallback callback, + void *ctx ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_Stop( IFusionSoundMusicProvider *thiz ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus *status ) + { + if (!status) +- return DFB_INVARG; ++ return DR_INVARG; + + *status = FMSTATE_UNKNOWN; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_SeekTo( IFusionSoundMusicProvider *thiz, + double seconds ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetPos( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = 0.0; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_GetLength( IFusionSoundMusicProvider *thiz, + double *seconds ) + { + if (!seconds) +- return DFB_INVARG; ++ return DR_INVARG; + + *seconds = 0.0; + +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_SetPlaybackFlags( IFusionSoundMusicProvider *thiz, + FSMusicProviderPlaybackFlags flags ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + +-static DFBResult ++static DirectResult + IFusionSoundMusicProvider_WaitStatus( IFusionSoundMusicProvider *thiz, + FSMusicProviderStatus mask, + unsigned int timeout ) + { +- return DFB_UNIMPLEMENTED; ++ return DR_UNIMPLEMENTED; + } + + static void +@@ -244,11 +244,11 @@ IFusionSoundMusicProvider_Construct( IFusionSoundMusicProvider *thiz ) + } + + +-DFBResult ++DirectResult + IFusionSoundMusicProvider_Create( const char *filename, + IFusionSoundMusicProvider **interface ) + { +- DFBResult ret; ++ DirectResult ret; + DirectInterfaceFuncs *funcs = NULL; + IFusionSoundMusicProvider *musicprovider; + IFusionSoundMusicProvider_ProbeContext ctx; +diff --git a/src/media/ifusionsoundmusicprovider.h b/src/media/ifusionsoundmusicprovider.h +index a18d08f..94408a7 100644 +--- a/src/media/ifusionsoundmusicprovider.h ++++ b/src/media/ifusionsoundmusicprovider.h +@@ -43,7 +43,7 @@ typedef struct { + } IFusionSoundMusicProvider_ProbeContext; + + +-DFBResult IFusionSoundMusicProvider_Create( const char *filename, ++DirectResult IFusionSoundMusicProvider_Create( const char *filename, + IFusionSoundMusicProvider **interface ); + + #endif +diff --git a/src/misc/sound_conf.c b/src/misc/sound_conf.c +index b998730..6af2762 100644 +--- a/src/misc/sound_conf.c ++++ b/src/misc/sound_conf.c +@@ -139,7 +139,7 @@ parse_modestring( const char *mode ) + } + + +-static DFBResult ++static DirectResult + parse_args( const char *args ) + { + char *buf = alloca( strlen(args) + 1 ); +@@ -147,7 +147,7 @@ parse_args( const char *args ) + strcpy( buf, args ); + + while (buf && buf[0]) { +- DFBResult ret; ++ DirectResult ret; + char *value; + char *next; + +@@ -164,9 +164,9 @@ parse_args( const char *args ) + + ret = fs_config_set( buf, value ); + switch (ret) { +- case DFB_OK: ++ case DR_OK: + break; +- case DFB_UNSUPPORTED: ++ case DR_UNSUPPORTED: + D_ERROR( "FusionSound/Config: Unknown option '%s'!\n", buf ); + break; + default: +@@ -176,7 +176,7 @@ parse_args( const char *args ) + buf = next; + } + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -203,7 +203,7 @@ fs_config_usage( void ) + return config_usage; + } + +-DFBResult ++DirectResult + fs_config_set( const char *name, const char *value ) + { + if (!strcmp( name, "driver" )) { +@@ -214,7 +214,7 @@ fs_config_set( const char *name, const char *value ) + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "device" )) { +@@ -225,7 +225,7 @@ fs_config_set( const char *name, const char *value ) + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "channels" )) { +@@ -234,18 +234,18 @@ fs_config_set( const char *name, const char *value ) + + if (sscanf( value, "%d", &channels ) < 1) { + D_ERROR( "FusionSound/Config '%s': Could not parse value!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + else if (channels < 1 || channels > FS_MAX_CHANNELS) { + D_ERROR( "FusionSound/Config '%s': Unsupported value '%d'!\n", name, channels ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->channelmode = fs_mode_for_channels( channels ); + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "channelmode" )) { +@@ -255,14 +255,14 @@ fs_config_set( const char *name, const char *value ) + mode = parse_modestring( value ); + if (mode == FSCM_UNKNOWN) { + D_ERROR( "FusionSound/Config '%s': Could not parse value!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->channelmode = mode; + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "sampleformat" )) { +@@ -272,14 +272,14 @@ fs_config_set( const char *name, const char *value ) + format = parse_sampleformat( value ); + if (format == FSSF_UNKNOWN) { + D_ERROR( "FusionSound/Config '%s': Could not parse value!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->sampleformat = format; + } + else { + D_ERROR( "FusionSound/Config '%s': No format specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "samplerate" )) { +@@ -289,18 +289,18 @@ fs_config_set( const char *name, const char *value ) + if (sscanf( value, "%d", &rate ) < 1) { + D_ERROR( "FusionSound/Config 'samplerate': " + "Could not parse value!\n" ); +- return DFB_INVARG; ++ return DR_INVARG; + } + else if (rate < 1) { + D_ERROR( "FusionSound/Config '%s': Unsupported value '%d'!\n", name, rate ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->samplerate = rate; + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "buffertime" )) { +@@ -310,18 +310,18 @@ fs_config_set( const char *name, const char *value ) + if (sscanf( value, "%d", &time ) < 1) { + D_ERROR( "FusionSound/Config 'buffertime': " + "Could not parse value!\n" ); +- return DFB_INVARG; ++ return DR_INVARG; + } + else if (time < 1 || time > 5000) { + D_ERROR( "FusionSound/Config '%s': Unsupported value '%d'!\n", name, time ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->buffertime = time; + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "session" )) { +@@ -330,14 +330,14 @@ fs_config_set( const char *name, const char *value ) + + if (sscanf( value, "%d", &session ) < 1) { + D_ERROR( "FusionSound/Config '%s': Could not parse value!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + fs_config->session = session; + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp (name, "remote" )) { +@@ -348,7 +348,7 @@ fs_config_set( const char *name, const char *value ) + if (sscanf( value, "%127s:%d", host, &session ) < 1) { + D_ERROR( "FusionSound/Config '%s': " + "Could not parse value (format is [:])!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + + if (fs_config->remote.host) +@@ -359,7 +359,7 @@ fs_config_set( const char *name, const char *value ) + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "remote-compression" )) { +@@ -372,12 +372,12 @@ fs_config_set( const char *name, const char *value ) + } + else { + D_ERROR( "FusionSound/Config '%s': Unsupported value '%s'!\n", name, value ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else { + D_ERROR( "FusionSound/Config '%s': No value specified!\n", name ); +- return DFB_INVARG; ++ return DR_INVARG; + } + } + else if (!strcmp( name, "banner" )) { +@@ -411,15 +411,15 @@ fs_config_set( const char *name, const char *value ) + fs_config->dma = false; + } + else if (fusion_config_set( name, value ) && direct_config_set( name, value )) +- return DFB_UNSUPPORTED; ++ return DR_UNSUPPORTED; + +- return DFB_OK; ++ return DR_OK; + } + +-static DFBResult ++static DirectResult + fs_config_read( const char *filename ) + { +- DFBResult ret = DFB_OK; ++ DirectResult ret = DR_OK; + char line[400]; + FILE *f; + +@@ -427,7 +427,7 @@ fs_config_read( const char *filename ) + if (!f) { + D_DEBUG( "FusionSound/Config: " + "Unable to open config file `%s'!\n", filename ); +- return DFB_IO; ++ return DR_IO; + } else { + D_INFO( "FusionSound/Config: " + "Parsing config file '%s'.\n", filename ); +@@ -449,7 +449,7 @@ fs_config_read( const char *filename ) + + ret = fs_config_set( name, value ); + if (ret) { +- if (ret == DFB_UNSUPPORTED) ++ if (ret == DR_UNSUPPORTED) + D_ERROR( "FusionSound/Config: In config file `%s': " + "Invalid option `%s'!\n", filename, name ); + break; +@@ -461,22 +461,22 @@ fs_config_read( const char *filename ) + return ret; + } + +-DFBResult ++DirectResult + fs_config_init( int *argc, char **argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + char *home = getenv( "HOME" ); + char *prog = NULL; + char *fsargs; + + if (fs_config) +- return DFB_OK; ++ return DR_OK; + + config_allocate(); + + /* Read system settings. */ + ret = fs_config_read( SYSCONFDIR"/fusionsoundrc" ); +- if (ret && ret != DFB_IO) ++ if (ret && ret != DR_IO) + return ret; + + /* Read user settings. */ +@@ -487,7 +487,7 @@ fs_config_init( int *argc, char **argv[] ) + snprintf( buf, len, "%s/.fusionsoundrc", home ); + + ret = fs_config_read( buf ); +- if (ret && ret != DFB_IO) ++ if (ret && ret != DR_IO) + return ret; + } + +@@ -509,7 +509,7 @@ fs_config_init( int *argc, char **argv[] ) + snprintf( buf, len, SYSCONFDIR"/fusionsoundrc.%s", prog ); + + ret = fs_config_read( buf ); +- if (ret && ret != DFB_IO) ++ if (ret && ret != DR_IO) + return ret; + } + +@@ -521,7 +521,7 @@ fs_config_init( int *argc, char **argv[] ) + snprintf( buf, len, "%s/.fusionsoundrc.%s", home, prog ); + + ret = fs_config_read( buf ); +- if (ret && ret != DFB_IO) ++ if (ret && ret != DR_IO) + return ret; + } + +@@ -573,5 +573,5 @@ fs_config_init( int *argc, char **argv[] ) + } + } + +- return DFB_OK; ++ return DR_OK; + } +diff --git a/src/misc/sound_conf.h b/src/misc/sound_conf.h +index 232966f..e4291b0 100644 +--- a/src/misc/sound_conf.h ++++ b/src/misc/sound_conf.h +@@ -69,12 +69,12 @@ extern FSConfig *fs_config; + * for overrides. Options identified as FusionSound options are stripped out + * of the array. + */ +-DFBResult fs_config_init( int *argc, char **argv[] ); ++DirectResult fs_config_init( int *argc, char **argv[] ); + + /* + * Set indiviual option. Used by config_init(), and FusionSoundSetOption() + */ +-DFBResult fs_config_set( const char *name, const char *value ); ++DirectResult fs_config_set( const char *name, const char *value ); + + const char *fs_config_usage( void ); + +diff --git a/tools/fsdump.c b/tools/fsdump.c +index 3c15afd..53e6a3d 100644 +--- a/tools/fsdump.c ++++ b/tools/fsdump.c +@@ -57,10 +57,10 @@ + static IFusionSound *fsound = NULL; + + +-static DFBResult ++static DirectResult + init_fusionsound( int *argc, char **argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + + /* Initialize FusionSound. */ + ret = FusionSoundInit( argc, argv ); +@@ -72,7 +72,7 @@ init_fusionsound( int *argc, char **argv[] ) + if (ret) + return FusionSoundError( "FusionSoundCreate", ret ); + +- return DFB_OK; ++ return DR_OK; + } + + static void +@@ -156,7 +156,7 @@ dump_buffers( CoreSound *core ) + int + main( int argc, char *argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + long long millis; + long int seconds, minutes, hours, days; + IFusionSound_data *data; +diff --git a/tools/fsmaster.c b/tools/fsmaster.c +index f552f02..82875ab 100644 +--- a/tools/fsmaster.c ++++ b/tools/fsmaster.c +@@ -42,7 +42,7 @@ + int + main( int argc, char *argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *sound; + + ret = FusionSoundInit( &argc, &argv ); +diff --git a/tools/fsplay.c b/tools/fsplay.c +index 8f83281..3a5692e 100644 +--- a/tools/fsplay.c ++++ b/tools/fsplay.c +@@ -187,7 +187,7 @@ parse_options( int argc, char **argv ) + usage( argv[0] ); + } + +-static DFBEnumerationResult ++static DirectEnumerationResult + track_add_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + { + Media *media = ctx; +@@ -202,18 +202,18 @@ track_add_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + track = D_MALLOC( sizeof(MediaTrack) ); + if (!track) { + D_OOM(); +- return DFENUM_CANCEL; ++ return DENUM_CANCEL; + } + track->id = id; + direct_list_append( (DirectLink**)&media->tracks, &track->link ); + +- return DFENUM_OK; ++ return DENUM_OK; + } + + static int + playback_run( IFusionSoundMusicProvider *provider, Media *media ) + { +- DFBResult ret; ++ DirectResult ret; + FSMusicProviderStatus status = FMSTATE_UNKNOWN; + FSStreamDescription s_dsc; + FSTrackDescription t_dsc; +@@ -468,8 +468,8 @@ playback_run( IFusionSoundMusicProvider *provider, Media *media ) + int + main( int argc, char **argv ) + { +- DFBResult ret; +- Media *media; ++ DirectResult ret; ++ Media *media; + + ret = FusionSoundInit( &argc, &argv ); + if (ret) +diff --git a/tools/fsproxy.c b/tools/fsproxy.c +index b01bd80..c3418fc 100644 +--- a/tools/fsproxy.c ++++ b/tools/fsproxy.c +@@ -49,17 +49,17 @@ + + /*****************************************************************************/ + +-static DFBBoolean parse_command_line( int argc, char *argv[] ); +-static DFBResult server_run(); ++static bool parse_command_line( int argc, char *argv[] ); ++static DirectResult server_run(); + +-static DFBBoolean keep_alive = DFB_FALSE; ++static bool keep_alive; + + /*****************************************************************************/ + + int + main( int argc, char *argv[] ) + { +- DFBResult ret; ++ DirectResult ret; + + /* Initialize FusionSound including command line parsing. */ + ret = FusionSoundInit( &argc, &argv ); +@@ -109,7 +109,7 @@ ConstructDispatcher( VoodooServer *server, + + *ret_instance = instance; + +- return DFB_OK; ++ return DR_OK; + } + + /*****************************************************************************/ +@@ -130,7 +130,7 @@ usage( const char *progname ) + FUSIONSOUND_VERSION, progname ); + } + +-static DFBBoolean ++static bool + parse_command_line( int argc, char *argv[] ) + { + int i; +@@ -138,28 +138,28 @@ parse_command_line( int argc, char *argv[] ) + for (i = 1; i < argc; i++) { + if (!strcmp( argv[i], "-h" ) || !strcmp( argv[i], "--help" )) { + usage( argv[0] ); +- return DFB_FALSE; ++ return DR_FALSE; + } + else if (!strcmp( argv[i], "-v" ) || !strcmp( argv[i], "--version" )) { + puts( FUSIONSOUND_VERSION ); + exit( 0 ); + } + else if (!strcmp( argv[i], "-k" ) || !strcmp( argv[i], "--keep-alive" )) { +- keep_alive = DFB_TRUE; ++ keep_alive = DR_TRUE; + } + else { + fprintf( stderr, "Unsupported option '%s'!\n", argv[i] ); +- return DFB_FALSE; ++ return DR_FALSE; + } + } + +- return DFB_TRUE; ++ return DR_TRUE; + } + +-static DFBResult ++static DirectResult + server_run() + { +- DFBResult ret; ++ DirectResult ret; + VoodooServer *server; + + ret = voodoo_server_create( &server ); +@@ -185,6 +185,6 @@ server_run() + + voodoo_server_destroy( server ); + +- return DFB_OK; ++ return DR_OK; + } + +diff --git a/tools/fsvolume.c b/tools/fsvolume.c +index 239de9a..bb8a54b 100644 +--- a/tools/fsvolume.c ++++ b/tools/fsvolume.c +@@ -60,7 +60,7 @@ usage( const char *progname ) + int + main( int argc, char **argv ) + { +- DFBResult ret; ++ DirectResult ret; + IFusionSound *sound; + float volume = 0.0f; + +From: Claudio Ciccani +Date: Fri, 29 Feb 2008 15:09:07 +0000 (+0100) +Subject: Fixed types conversion. +X-Git-Url: http://git.directfb.org/?p=core%2FFusionSound.git;a=commitdiff_plain;h=e70270e44777ca1b3f0edafbdc5b92d19a1067c4 + +Fixed types conversion. +--- + +diff --git a/examples/loader.c b/examples/loader.c +index eb4b0ff..1509658 100644 +--- a/examples/loader.c ++++ b/examples/loader.c +@@ -104,7 +104,7 @@ load_sample (IFusionSound *sound, const char *filename) + return NULL; + } + +- while (DR_TRUE) { ++ while (1) { + char magic[4]; + + len = read_chunk_header (fd, magic); +@@ -168,7 +168,7 @@ load_sample (IFusionSound *sound, const char *filename) + desc.sampleformat = (fmt.bitspersample == 8) ? FSSF_U8 : FSSF_S16; + desc.samplerate = fmt.frequency; + +- while (DR_TRUE) { ++ while (1) { + char magic[4]; + + len = read_chunk_header (fd, magic); +diff --git a/examples/music.c b/examples/music.c +index c30c462..fa00ebd 100644 +--- a/examples/music.c ++++ b/examples/music.c +@@ -63,7 +63,7 @@ track_display_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + *desc.artist ? desc.artist : "Unknown", + *desc.title ? desc.title : "Unknown" ); + +- return DFENUM_OK; ++ return DENUM_OK; + } + + static DirectEnumerationResult +@@ -80,7 +80,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + ret = provider->SelectTrack( provider, id ); + if (ret) { + FusionSoundError( "IFusionSoundMusicProvider::SelectTrack", ret ); +- return DFENUM_OK; ++ return DENUM_OK; + } + + provider->GetStreamDescription( provider, &s_dsc ); +@@ -105,7 +105,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + ret = sound->CreateStream( sound, &s_dsc, &stream ); + if (ret) { + FusionSoundError( "IFusionSound::CreateStream", ret ); +- return DFENUM_CANCEL; ++ return DENUM_CANCEL; + } + stream->GetDescription( stream, &s_dsc ); + stream->GetPlayback( stream, &playback ); +@@ -121,7 +121,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + ret = provider->PlayToStream( provider, stream ); + if (ret) { + FusionSoundError( "IFusionSoundMusicProvider::PlayTo", ret ); +- return DFENUM_CANCEL; ++ return DENUM_CANCEL; + } + + /* Update track's description. */ +@@ -202,7 +202,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + case 'q': + case 'Q': + case '\033': // Escape +- return DFENUM_CANCEL; ++ return DENUM_CANCEL; + default: + break; + } +@@ -214,7 +214,7 @@ track_playback_callback( FSTrackID id, FSTrackDescription desc, void *ctx ) + + printf( "\n" ); + +- return DFENUM_OK; ++ return DENUM_OK; + } + + int +diff --git a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c +index 20603a6..e5e0465 100644 +--- a/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c ++++ b/interfaces/IFusionSoundMusicProvider/ifusionsoundmusicprovider_cdda.c +@@ -714,7 +714,7 @@ IFusionSoundMusicProvider_CDDA_EnumTracks( IFusionSoundMusicProvider *thiz, + direct_snputs( desc.encoding, "PCM 16 bit", FS_TRACK_DESC_ENCODING_LENGTH ); + desc.bitrate = CD_FRAMES_PER_SECOND * CD_BYTES_PER_FRAME * 8; + +- if (callback( i, desc, callbackdata ) != DFENUM_OK) ++ if (callback( i, desc, callbackdata )) + break; + } + +diff --git a/proxy/requestor/ifusionsoundplayback_requestor.c b/proxy/requestor/ifusionsoundplayback_requestor.c +index 4dca795..75f3ba1 100644 +--- a/proxy/requestor/ifusionsoundplayback_requestor.c ++++ b/proxy/requestor/ifusionsoundplayback_requestor.c +@@ -204,7 +204,7 @@ IFusionSoundPlayback_Requestor_GetStatus( IFusionSoundPlayback *thiz, + { + DirectResult ret; + VoodooResponseMessage *response; +- bool playing = DR_FALSE; ++ bool playing = false; + int position = 0; + + DIRECT_INTERFACE_GET_DATA(IFusionSoundPlayback_Requestor) +diff --git a/tools/fsproxy.c b/tools/fsproxy.c +index c3418fc..ad16f74 100644 +--- a/tools/fsproxy.c ++++ b/tools/fsproxy.c +@@ -138,22 +138,22 @@ parse_command_line( int argc, char *argv[] ) + for (i = 1; i < argc; i++) { + if (!strcmp( argv[i], "-h" ) || !strcmp( argv[i], "--help" )) { + usage( argv[0] ); +- return DR_FALSE; ++ return false; + } + else if (!strcmp( argv[i], "-v" ) || !strcmp( argv[i], "--version" )) { + puts( FUSIONSOUND_VERSION ); + exit( 0 ); + } + else if (!strcmp( argv[i], "-k" ) || !strcmp( argv[i], "--keep-alive" )) { +- keep_alive = DR_TRUE; ++ keep_alive = true; + } + else { + fprintf( stderr, "Unsupported option '%s'!\n", argv[i] ); +- return DR_FALSE; ++ return false; + } + } + +- return DR_TRUE; ++ return true; + } + + static DirectResult -- 2.44.0