Diff for /src/sys/i386/gnu/isa/sound/Attic/awe_wave.c between versions 1.2 and 1.3

version 1.2, 2003/08/07 21:17:21 version 1.3, 2004/02/12 23:33:26
Line 25 Line 25
   
 #include <stddef.h>  #include <stddef.h>
   
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 #  include "awe_config.h"  #  include "awe_config.h"
 #else  #else
 #  include "awe_config.h"  #  include "awe_config.h"
Line 35 Line 35
   
 #ifdef CONFIG_AWE32_SYNTH  #ifdef CONFIG_AWE32_SYNTH
   
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 #  include "awe_hw.h"  #  include "awe_hw.h"
 #  include "awe_version.h"  #  include "awe_version.h"
 #  include "awe_voice.h"  #  include "awe_voice.h"
Line 48 Line 48
 #ifdef AWE_HAS_GUS_COMPATIBILITY  #ifdef AWE_HAS_GUS_COMPATIBILITY
 /* include finetune table */  /* include finetune table */
   
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 #  ifdef AWE_OBSOLETE_VOXWARE  #  ifdef AWE_OBSOLETE_VOXWARE
 #    define SEQUENCER_C  #    define SEQUENCER_C
 #  endif  #  endif
Line 63 Line 63
   
 #ifdef linux  #ifdef linux
 #  include <linux/ultrasound.h>  #  include <linux/ultrasound.h>
#elif defined(__FreeBSD__)#elif defined(__DragonFly__) || defined(__FreeBSD__)
 #  include <machine/ultrasound.h>  #  include <machine/ultrasound.h>
 #endif  #endif
   
Line 450  static int awe_mixer_ioctl(int dev, unsi Line 450  static int awe_mixer_ioctl(int dev, unsi
 #endif  #endif
   
 /* define macros for compatibility */  /* define macros for compatibility */
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 #  include "awe_compat.h"  #  include "awe_compat.h"
 #else  #else
 #  include "awe_compat.h"  #  include "awe_compat.h"
Line 492  static struct synth_operations awe_opera Line 492  static struct synth_operations awe_opera
   
 #ifdef CONFIG_AWE32_MIXER  #ifdef CONFIG_AWE32_MIXER
 static struct mixer_operations awe_mixer_operations = {  static struct mixer_operations awe_mixer_operations = {
#ifndef __FreeBSD__#if !defined(__DragonFly__) && !defined(__FreeBSD__)
         "AWE32",          "AWE32",
 #endif  #endif
         "AWE32 Equalizer",          "AWE32 Equalizer",
Line 511  static struct mixer_operations awe_mixer Line 511  static struct mixer_operations awe_mixer
 #define ATTACH_DECL     /**/  #define ATTACH_DECL     /**/
 #endif  #endif
   
#if defined(__FreeBSD__) && !defined(AWE_OBSOLETE_VOXWARE)#if (defined(__DragonFly__) || defined(__FreeBSD__)) && !defined(AWE_OBSOLETE_VOXWARE)
 #  define ATTACH_RET  #  define ATTACH_RET
 void attach_awe(struct address_info *hw_config)  void attach_awe(struct address_info *hw_config)
 #else  #else
Line 582  int attach_awe(void) Line 582  int attach_awe(void)
   
         snprintf(awe_info.name, sizeof(awe_info.name), "AWE32-%s (RAM%dk)",          snprintf(awe_info.name, sizeof(awe_info.name), "AWE32-%s (RAM%dk)",
                 AWEDRV_VERSION, awe_mem_size/1024);                  AWEDRV_VERSION, awe_mem_size/1024);
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
         printk("awe0: <SoundBlaster EMU8000 MIDI (RAM%dk)>", awe_mem_size/1024);          printk("awe0: <SoundBlaster EMU8000 MIDI (RAM%dk)>", awe_mem_size/1024);
 #elif defined(AWE_DEBUG_ON)  #elif defined(AWE_DEBUG_ON)
         printk("%s\n", awe_info.name);          printk("%s\n", awe_info.name);
Line 639  void unload_awe(void) Line 639  void unload_awe(void)
   
 #ifdef AWE_OBSOLETE_VOXWARE  #ifdef AWE_OBSOLETE_VOXWARE
   
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 long attach_awe_obsolete(long mem_start, struct address_info *hw_config)  long attach_awe_obsolete(long mem_start, struct address_info *hw_config)
 #else  #else
 int attach_awe_obsolete(int mem_start, struct address_info *hw_config)  int attach_awe_obsolete(int mem_start, struct address_info *hw_config)
Line 658  int probe_awe_obsolete(struct address_in Line 658  int probe_awe_obsolete(struct address_in
 }  }
   
 #else  #else
#if defined(__FreeBSD__ )#if defined(__DragonFly__) || defined(__FreeBSD__ )
 int probe_awe(struct address_info *hw_config)  int probe_awe(struct address_info *hw_config)
 {  {
         return 1;          return 1;
Line 3088  awe_replace_data(awe_patch_info *patch, Line 3088  awe_replace_data(awe_patch_info *patch,
 static const char *readbuf_addr;  static const char *readbuf_addr;
 static int readbuf_offs;  static int readbuf_offs;
 static int readbuf_flags;  static int readbuf_flags;
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 static unsigned short *readbuf_loop;  static unsigned short *readbuf_loop;
 static int readbuf_loopstart, readbuf_loopend;  static int readbuf_loopstart, readbuf_loopend;
 #endif  #endif
Line 3097  static int readbuf_loopstart, readbuf_lo Line 3097  static int readbuf_loopstart, readbuf_lo
 static int  static int
 readbuf_init(const char *addr, int offset, awe_sample_info *sp)  readbuf_init(const char *addr, int offset, awe_sample_info *sp)
 {  {
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
         readbuf_loop = NULL;          readbuf_loop = NULL;
         readbuf_loopstart = sp->loopstart;          readbuf_loopstart = sp->loopstart;
         readbuf_loopend = sp->loopend;          readbuf_loopend = sp->loopend;
Line 3131  readbuf_word(int pos) Line 3131  readbuf_word(int pos)
         }          }
         if (readbuf_flags & AWE_SAMPLE_UNSIGNED)          if (readbuf_flags & AWE_SAMPLE_UNSIGNED)
                 c ^= 0x8000; /* unsigned -> signed */                  c ^= 0x8000; /* unsigned -> signed */
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
         /* write on cache for reverse loop */          /* write on cache for reverse loop */
         if (readbuf_flags & (AWE_SAMPLE_BIDIR_LOOP|AWE_SAMPLE_REVERSE_LOOP)) {          if (readbuf_flags & (AWE_SAMPLE_BIDIR_LOOP|AWE_SAMPLE_REVERSE_LOOP)) {
                 if (pos >= readbuf_loopstart && pos < readbuf_loopend)                  if (pos >= readbuf_loopstart && pos < readbuf_loopend)
Line 3141  readbuf_word(int pos) Line 3141  readbuf_word(int pos)
         return c;          return c;
 }  }
   
#ifdef __FreeBSD__#if defined(__DragonFly__) || defined(__FreeBSD__)
 /* read from cache */  /* read from cache */
 static unsigned short  static unsigned short
 readbuf_word_cache(int pos)  readbuf_word_cache(int pos)

Removed from v.1.2  
changed lines
  Added in v.1.3