Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242957
b: refs/heads/master
c: 4d00135
h: refs/heads/master
i:
  242955: 7a33084
v: v3
  • Loading branch information
Dan Rosenberg authored and Takashi Iwai committed Mar 23, 2011
1 parent 34f1924 commit 8a80986
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b769f49463711205d57286e64cf535ed4daf59e9
refs/heads/master: 4d00135a680727f6c3be78f8befaac009030e4df
15 changes: 13 additions & 2 deletions trunk/sound/oss/opl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,10 @@ static int opl3_load_patch(int dev, int format, const char __user *addr,

static void opl3_panning(int dev, int voice, int value)
{

if (voice < 0 || voice >= devc->nr_voice)
return;

devc->voc[voice].panning = value;
}

Expand Down Expand Up @@ -1062,8 +1066,15 @@ static int opl3_alloc_voice(int dev, int chn, int note, struct voice_alloc_info

static void opl3_setup_voice(int dev, int voice, int chn)
{
struct channel_info *info =
&synth_devs[dev]->chn_info[chn];
struct channel_info *info;

if (voice < 0 || voice >= devc->nr_voice)
return;

if (chn < 0 || chn > 15)
return;

info = &synth_devs[dev]->chn_info[chn];

opl3_set_instr(dev, voice, info->pgm_num);

Expand Down

0 comments on commit 8a80986

Please sign in to comment.