Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
soundfont.c File Reference
#include <asm/uaccess.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/soundfont.h>
#include <sound/seq_oss_legacy.h>

Go to the source code of this file.

Macros

#define OFFSET_MSEC   653117 /* base = 1000 */
 
#define OFFSET_ABSCENT   851781 /* base = 8176 */
 
#define OFFSET_SAMPLERATE   1011119 /* base = 44100 */
 
#define ABSCENT_RATIO   1200
 
#define TIMECENT_RATIO   1200
 
#define SAMPLERATE_RATIO   4096
 
#define calc_gus_sustain(val)   (0x7f - snd_sf_vol_table[(val)/2])
 
#define calc_gus_attenuation(val)   snd_sf_vol_table[(val)/2]
 

Functions

int snd_soundfont_close_check (struct snd_sf_list *sflist, int client)
 
int snd_soundfont_load (struct snd_sf_list *sflist, const void __user *data, long count, int client)
 
int snd_sf_linear_to_log (unsigned int amount, int offset, int ratio)
 
 EXPORT_SYMBOL (snd_sf_linear_to_log)
 
int snd_sf_calc_parm_hold (int msec)
 
int snd_sf_calc_parm_attack (int msec)
 
int snd_sf_calc_parm_decay (int msec)
 
int snd_soundfont_load_guspatch (struct snd_sf_list *sflist, const char __user *data, long count, int client)
 
int snd_soundfont_search_zone (struct snd_sf_list *sflist, int *notep, int vel, int preset, int bank, int def_preset, int def_bank, struct snd_sf_zone **table, int max_layers)
 
struct snd_sf_listsnd_sf_new (struct snd_sf_callback *callback, struct snd_util_memhdr *hdr)
 
void snd_sf_free (struct snd_sf_list *sflist)
 
int snd_soundfont_remove_samples (struct snd_sf_list *sflist)
 
int snd_soundfont_remove_unlocked (struct snd_sf_list *sflist)
 

Variables

int snd_sf_vol_table [128]
 

Macro Definition Documentation

#define ABSCENT_RATIO   1200

Definition at line 824 of file soundfont.c.

#define calc_gus_attenuation (   val)    snd_sf_vol_table[(val)/2]

Definition at line 945 of file soundfont.c.

#define calc_gus_sustain (   val)    (0x7f - snd_sf_vol_table[(val)/2])

Definition at line 944 of file soundfont.c.

#define OFFSET_ABSCENT   851781 /* base = 8176 */

Definition at line 821 of file soundfont.c.

#define OFFSET_MSEC   653117 /* base = 1000 */

Definition at line 820 of file soundfont.c.

#define OFFSET_SAMPLERATE   1011119 /* base = 44100 */

Definition at line 822 of file soundfont.c.

#define SAMPLERATE_RATIO   4096

Definition at line 826 of file soundfont.c.

#define TIMECENT_RATIO   1200

Definition at line 825 of file soundfont.c.

Function Documentation

EXPORT_SYMBOL ( snd_sf_linear_to_log  )
int snd_sf_calc_parm_attack ( int  msec)

Definition at line 920 of file soundfont.c.

int snd_sf_calc_parm_decay ( int  msec)

Definition at line 927 of file soundfont.c.

int snd_sf_calc_parm_hold ( int  msec)

Definition at line 895 of file soundfont.c.

void snd_sf_free ( struct snd_sf_list sflist)

Definition at line 1418 of file soundfont.c.

int snd_sf_linear_to_log ( unsigned int  amount,
int  offset,
int  ratio 
)

Definition at line 798 of file soundfont.c.

struct snd_sf_list* snd_sf_new ( struct snd_sf_callback callback,
struct snd_util_memhdr hdr 
)
read

Definition at line 1395 of file soundfont.c.

int snd_soundfont_close_check ( struct snd_sf_list sflist,
int  client 
)

Definition at line 107 of file soundfont.c.

int snd_soundfont_load ( struct snd_sf_list sflist,
const void __user data,
long  count,
int  client 
)

Definition at line 129 of file soundfont.c.

int snd_soundfont_load_guspatch ( struct snd_sf_list sflist,
const char __user data,
long  count,
int  client 
)

Definition at line 1126 of file soundfont.c.

int snd_soundfont_remove_samples ( struct snd_sf_list sflist)

Definition at line 1437 of file soundfont.c.

int snd_soundfont_remove_unlocked ( struct snd_sf_list sflist)

Definition at line 1453 of file soundfont.c.

int snd_soundfont_search_zone ( struct snd_sf_list sflist,
int notep,
int  vel,
int  preset,
int  bank,
int  def_preset,
int  def_bank,
struct snd_sf_zone **  table,
int  max_layers 
)

Definition at line 1231 of file soundfont.c.

Variable Documentation

int snd_sf_vol_table[128]
Initial value:
= {
255,111,95,86,79,74,70,66,63,61,58,56,54,52,50,49,
47,46,45,43,42,41,40,39,38,37,36,35,34,34,33,32,
31,31,30,29,29,28,27,27,26,26,25,24,24,23,23,22,
22,21,21,21,20,20,19,19,18,18,18,17,17,16,16,16,
15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,
10,10,10,9,9,9,8,8,8,8,7,7,7,7,6,6,
6,6,5,5,5,5,5,4,4,4,4,3,3,3,3,3,
2,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,
}

Definition at line 932 of file soundfont.c.