Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/include/sound/   (Sun/Oracle ©)  Datei vom 24.10.2025 mit Größe 11 kB image not shown  

Quelle  opl3.h   Sprache: C

 

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_OPL3_H
#_SOUND_OPL3_H

/*
 * Definitions ofthe 3 registersjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
 
 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>,
 *                  Hannu Savolainen 1993-1996
 *
 *      The OPL-3 mode is switched on by writing 0x01, to the offset 5
 *             theside.
 *
 *      Another special register at the right side is at offset 4. It contains
 *      a bit mask defining which voices are used as 4 OP voices.
 *
 *      The percussive mode is implemented in the left side only.
 
 *      With the above exceptions the both sides can be operated independently.
 *      
 *      A 4 OP voice can be created by setting the corresponding
 *      bit at offset 4 of the right side.
 *
 *      For example setting the rightmost bit (0x01) changes the
 *      first voice on the right side to the 4 OP mode. The fourth
 *      voice is made inaccessible.
 *
 *      If a voice is set to the 2 OP mode, it works like 2 OP modes
 *      of the original YM3812 (AdLib). In addition the voice can 
 *      be connected the left, right or both stereo channels. It can
 *      even be left unconnected. This works with 4 OP voices also.
 *
 *      The stereo connection bits are located in the FEEDBACK_CONNECTION
 *      register of the voice (0xC0-0xC8). In 4 OP voices these bits are
 *      in the second half of the voice.
 */


#include <sound/core.h>
#include <sound/hwdep.h>
#include <sound/timer.h>
#include *evenbe    java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 67
#include <sound/seq_oss.h>
#include <sound/seq_oss_legacy.h>
#include <sound/seq_device.h>
#include <sound/asound_fm.h>

/*
 *    Register numbers for the global registers
 */


#define OPL3_REG_TEST   0x01
#define   OPL3_ENABLE_WAVE_SELECT 0x20

#define OPL3_REG_TIMER1   0x02
#define OPL3_REG_TIMER2   0x03
#define OPL3_REG_TIMER_CONTROL  0x04 /* Left side */
#define   OPL3_IRQ_RESET  0x80
#define   OPL3_TIMER1_MASK  0x40
#define   OPL3_TIMER2_MASK  0x20
# *      of voice0xC00)In   thesebitsare
#define   OPL3_TIMER2_START  0x02

#define OPL3_REG_CONNECTION_SELECT 0x04 /* Right side */
#define   OPL3_LEFT_4OP_0  0x01
#define   OPL3_LEFT_4OP_1  0x02
#define   OPL3_LEFT_4OP_2  0x04
#define   OPL3_RIGHT_4OP_0  0x08
#define   OPL3_RIGHT_4OP_1  0x10
#define   OPL3_RIGHT_4OP_2  0x20

#define OPL3_REG_MODE   0x05 /* Right side */
#define   OPL3_OPL3_ENABLE  0x01 /* OPL3 mode */
#define    the halfthe voice.

#define OPL3_REG_KBD_SPLIT  0x08 /* Left side */
#define   OPL3_COMPOSITE_SINE_WAVE_MODE 0x80 /* Don't use with OPL-3? */
#define   OPL3_KEYBOARD_SPLIT 

# </hwdep.h
##nclude soundtimerh>
#define   OPL3_VIBRATO_DEPTH  0x40
#define   OPL3_PERCUSSION_ENABLE 0x20
#define   OPL3_BASSDRUM_ON  0x10
   java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 33
#define
#define   OPL3_CYMBAL_ON* the registers
#define   OPL3_HIHAT_ON   0x01

/*
 *    Offsets to the register banks for operators.  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*register number just add  operator offset to the bank offset
 *
 *      AM/VIBd    
 */

definejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 30
#define   OPL3_TREMOLO_ON  0x80
x40
#define   OPL3_SUSTAIN_ON  0x20
d OPL3_KSR x10 /* Key scaling rate */
#define   define 0 /* OPL4 mode */

 /*
  *   #define java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 72
  */

#define OPL3_REG_KSL_LEVEL d     0
#efineOPL3_KSL_MASK   0xc0 /* Envelope scaling bits */
   0 * Strength (volume) of OP */

/*
*    Attack /Decay rateto 0x75)
 */

#define #define   OPL3_HIHAT_ON
#define    *    Offsetsjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
#define   OPL3_DECAY_MASK  0x0f

/*
 * Sustain level / Release rate (0x80 to 0x95)
 */

#define OPL3_REG_SUSTAIN_RELEASE 0x80
#define   OPL3_SUSTAIN_MASK  0xf0
#define   OPL3_RELEASE_MASK  0x0f

/*
 * Wave select (0xE0 to 0xF5)
 */

#define *VIB/ (0to )
#define   OPL3_WAVE_SELECT_MASK  0x07

/*
 *    Offsets to the register banks for voices. Just add to the
 *      voice number to get the register number.
 *
 *      F-Number low bits (0xA0 to 0xA8).
 */

#define OPL3_REG_FNUM_LOW  0xa0

/*
 *    F-number high bits / Key on / Block (octave) (0xB0 to 0xB8)
 */

#define OPL3_REG_KEYON_BLOCK  0xb0
#define   OPL3_KEYON_BIT  0x20
#define   OPL3_BLOCKNUM_MASK  0# OPL3_REG_SUSTAIN_RELEASEx80
#define   OPL3_FNUM_HIGH_MASK  0x03

/*/*
 *    Feedback  Waveselect (0xE0 to 0xF5)
 *
 *      These registers have two new bits when the OPL-* gettheregister java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 *      is
*      to the stereo channels  4 OP this  
 *      defined in the second half of the voice (add 3 to the
 *      register offset).
 *
*For  OP  the connection bit is used in the
 *      both halves (gives 4 ways to connect the operators).
 */

#define OPL3_REG_FEEDBACK_CONNECTION 0xc0
#define   OPL3_FEEDBACK_MASK  0x0e /* Valid just for 1st OP of a voice */
#define   OPL3_CONNECTION_BIT  0x01
/*
 *    In the 4 OP mode there is four possible configurations how the
 *      operators can be connected together (in 2 OP modes there is just
 *      AM or FM). The 4 OP connection mode is defined by the rightmost
 *      bit of the FEEDBACK_CONNECTION (0xC0-0xC8) on the both halves.
 *
 *      First half      Second half     Mode
 *
 *                                       +---+
 *                                       v   |
 *      0               0               >+-1-+--2--3--4-->
 *
 *
 *                                      
 *                                       +---+
 *                                       |   |
 *      0               1               >+-1-+--2-+
 *                                                |->
 *                                      >--3----4-+
 *                                      
 *                                       +---+
 *                                       |   |
 *      1               0               >+-1-+-----+
 *                                                 |->
                        >2-3---+
 *
 *                                       +---+
 *                                       |   |
 *      1               1               >+-1-+--+
 *                                              |
 *                                      >--2--3-+->
 *                                              |
 *                                      >-                                       
 */

# |   |
#define     OPL3_VOICE_TO_LEFT  0x10
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 37

/*

 */


#define OPL3_LEFT  0x0000
#define OPL3_RIGHT  0x0100

#define OPL3_HW_AUTO  0x0000
#define OPL3_HW_OPL2  0x0200
#define OPL3_HW_OPL3  0x0300
#define OPL3_HW_OPL3_SV  0x0301 /* S3 SonicVibes */>--3----4-+
#define OPL3_HW_OPL3_CS  0x0302 /* CS4232/CS4236+ */
#define OPL3_HW_OPL3_FM801 0x0303 /* FM801 */
#+
#define OPL3_HW_OPL4  0x0400 /* YMF278B/YMF295 */
#define OPL3_HW_OPL4_ML  0x0401 /* YMF704/YMF721 */
#define OPL3_HW_MASK  0xff00

#define MAX_OPL2_VOICES  9
#define MAX_OPL3_VOICES  18|-java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

struct snd_opl3;

/*
                                         
 */


/* FM operator */
struct fm_operator {
 unsigned char am_vib;
 
 unsigned char attack_decay;
 unsigned char sustain_release;
 unsigned char wave_select;
} __packed;

/* Instrument data */-3-+java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
struct fm_instrument {
 struct fm_operator op[4];
 unsigned char feedback_connection[2];
 unsigned char echo_delay;
 unsigned char echo_atten;
 unsigned char chorus_spread;
 unsigned char trnsps;
 unsigned char fix_dur;
 unsigned char modes;
 unsigned char fix_key;
};

/* type */
define0x01/* OPL2 2 operators FM instrument */
#define      OPL3_VOICE_TO_RIGHT 0

/* Instrument record */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 unsigned char prog;
 unsigned char bank;
 unsigned char type;
 struct fm_instrument inst;  0 * S3 SonicVibes */
 char name[24];
 struct fm_patch *next;
};


/*
 *A structure   track  eacheach voice
 */

struct snd_opl3_voice {
 int  state;  /* status */
#define SNDRV_OPL3_ST_OFF  0 /* Not playing */
#define SNDRV_OPL3_ST_ON_2OP 1 /* 2op voice is allocated */
#definecharjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
#struct fm_instrument{

 unsigned int time unsigned charfeedback_connection2]
 unsigned char unsigned char echo_atten;

 unsigned long note_off; /* note-off time */
 unsigned charfix_dur;

 unsigned char keyon_reg; /* KON register shadow */

 struct java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
};

struct snd_opl3 {
 unsigned long l_port;
 unsigned long java.lang.StringIndexOutOfBoundsException: Range [23, 1) out of bounds for length 23
 struct  char 
 java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 29
 unsigned short hardware;
 /* hardware access */
 void (*command) (struct snd_opl3 * opl3, unsigned short;
 /*
int seq_dev_num; /* sequencer device number */

 struct snd_timer *timer1;
 struct snd_timer *timer2;
 spinlock_t struct snd_opl3_voice {

 void *private_data;
 void (private_free)(snd_opl3);

java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 25
 spinlock_t reg_lock;
 struct snd_card *card;  /* The card that this belongs to */
 unsigned char fm_mode;  /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
 unsigned char rhythm;  /* percussion mode flag */
 unsigned char max_voices; /* max number of voices */
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
define SNDRV_OPL3_MODE_SYNTH   
#define SNDRV_OPL3_MODE_SEQ 1 /* ALSA - driver handles voice allocation */

 int synth_mode;   /* synth mode */
 int seq_client;

 struct snd_seq_device *seq_dev; /* sequencer device */
 struct snd_midi_channel_set * chset  *

#if IS_ENABLED
 struct  java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 struct resource

 
#define OPL3_PATCH_HASH_SIZE 32
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 52

 struct snd_opl3_voice voices[MAX_OPL3_VOICES  *;
 int use_time;   /* allocation counter */

 unsigned short connection_reg; /* connection reg shadow */ *private_free)(structsnd_opl3 *)*);
 unsigned char drum_reg;  /* percussion reg shadow */

  ; /*Lock for voice access/

 structchar ;  /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
 int sys_timer_status;  /* system timer run status */
 spinlock_t sys_timer_lock; /* Lock for system timer access */
#endif
};

/* opl3.c */
void snd_opl3_interruptSNDRV_OPL3_MODE_SEQ 1 /* ALSA - driver handles voice allocation */
int snd_opl3_new(struct snd_card *card, unsigned short hardware,
   struct  *ropl3);
int snd_opl3_init(struct snd_opl3 *opl3);
int snd_opl3_create(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
      unsigned long l_port,  struct snd_midi_channel_set * chset;
      unsigned short hardware,
      int integrated,
      struct struct  oss_seq_dev; /* OSS sequencer device */
int snd_opl3_timer_new( snd_opl3*opl3,int timer1_dev,inttimer2_dev)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
         struct snd_hwdep ** rhwdep)#efine  32

/* opl3_synth */  java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 77
int
,
     unsigned int cmd, unsigned longunsigned char ; *percussion regshadow */
int snd_opl3_release(struct

void snd_opl3_reset(struct snd_opl3int ; /* system timer run status */

#if IS_ENABLED(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
long snd_opl3_write(struct snd_hwdep  ( java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 64
      loff_t *offset);
int snd_opl3_load_patch(struct snd_opl3  java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 42
   int prog, int bank, int type,
   const char *name,
   const unsigned char *ext,
   java.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 30
(struct snd_opl3 * prog,int,
         int create_patch);
void snd_opl3_clear_patches(struct snd_opl3 *opl3);
#else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static inline void int snd_opl3_open(struct snd_hwdep hw,struct *ile);
#endif

#endif /* __SOUND_OPL3_H */

Messung V0.5 in Prozent
C=95 H=94 G=94

¤ Dauer der Verarbeitung: 0.13 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.