Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d531d229
Commit
d531d229
authored
May 04, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
May 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: MOD_MIDIPORT has 0 voices and notes and FFFF ChannelMask.
parent
8aeb9ec0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
35 deletions
+32
-35
midi.c
dlls/wineoss.drv/midi.c
+32
-35
No files found.
dlls/wineoss.drv/midi.c
View file @
d531d229
...
@@ -217,33 +217,35 @@ static LRESULT OSS_MidiInit(void)
...
@@ -217,33 +217,35 @@ static LRESULT OSS_MidiInit(void)
MidiOutDev
[
i
].
caps
.
wPid
=
0x0001
;
/* FIXME Product ID */
MidiOutDev
[
i
].
caps
.
wPid
=
0x0001
;
/* FIXME Product ID */
/* Product Version. We simply say "1" */
/* Product Version. We simply say "1" */
MidiOutDev
[
i
].
caps
.
vDriverVersion
=
0x001
;
MidiOutDev
[
i
].
caps
.
vDriverVersion
=
0x001
;
/* The following are mandatory for MOD_MIDIPORT */
MidiOutDev
[
i
].
caps
.
wChannelMask
=
0xFFFF
;
MidiOutDev
[
i
].
caps
.
wChannelMask
=
0xFFFF
;
MidiOutDev
[
i
].
caps
.
wVoices
=
0
;
/* FIXME Do we have this information?
MidiOutDev
[
i
].
caps
.
wNotes
=
0
;
* Assuming the soundcards can handle
MidiOutDev
[
i
].
caps
.
dwSupport
=
0
;
* MIDICAPS_VOLUME and MIDICAPS_LRVOLUME but
* not MIDICAPS_CACHE.
*/
MidiOutDev
[
i
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
sinfo
.
device
=
i
;
sinfo
.
device
=
i
;
status
=
ioctl
(
midiSeqFD
,
SNDCTL_SYNTH_INFO
,
&
sinfo
);
status
=
ioctl
(
midiSeqFD
,
SNDCTL_SYNTH_INFO
,
&
sinfo
);
if
(
status
==
-
1
)
{
if
(
status
==
-
1
)
{
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'O'
,
'u'
,
't'
,
' '
,
'
('
,
'#'
,
'%'
,
'd'
,
')
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'O'
,
'u'
,
't'
,
' '
,
'
#'
,
'%'
,
'd
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
ERR
(
"ioctl for synth info failed on %d, disabling it.
\n
"
,
i
);
ERR
(
"ioctl for synth info failed on %d, disabling it.
\n
"
,
i
);
wsprintfW
(
MidiOutDev
[
i
].
caps
.
szPname
,
fmt
,
i
);
wsprintfW
(
MidiOutDev
[
i
].
caps
.
szPname
,
fmt
,
i
);
MidiOutDev
[
i
].
caps
.
wTechnology
=
MOD_MIDIPORT
;
MidiOutDev
[
i
].
caps
.
wTechnology
=
MOD_MIDIPORT
;
MidiOutDev
[
i
].
caps
.
wVoices
=
16
;
MidiOutDev
[
i
].
caps
.
wNotes
=
16
;
MidiOutDev
[
i
].
bEnabled
=
FALSE
;
MidiOutDev
[
i
].
bEnabled
=
FALSE
;
}
else
{
}
else
{
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
sinfo
.
name
,
-
1
,
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
sinfo
.
name
,
-
1
,
MidiOutDev
[
i
].
caps
.
szPname
,
MidiOutDev
[
i
].
caps
.
szPname
,
sizeof
(
MidiOutDev
[
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
)
);
sizeof
(
MidiOutDev
[
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
)
);
MidiOutDev
[
i
].
caps
.
wTechnology
=
MIDI_UnixToWindowsDeviceType
(
sinfo
.
synth_type
);
MidiOutDev
[
i
].
caps
.
wTechnology
=
MIDI_UnixToWindowsDeviceType
(
sinfo
.
synth_type
);
if
(
MOD_MIDIPORT
!=
MidiOutDev
[
i
].
caps
.
wTechnology
)
{
/* FIXME Do we have this information?
* Assuming the soundcards can handle
* MIDICAPS_VOLUME and MIDICAPS_LRVOLUME but
* not MIDICAPS_CACHE.
*/
MidiOutDev
[
i
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
MidiOutDev
[
i
].
caps
.
wVoices
=
sinfo
.
nr_voices
;
MidiOutDev
[
i
].
caps
.
wVoices
=
sinfo
.
nr_voices
;
/* FIXME Is it possible to know the maximum
/* FIXME Is it possible to know the maximum
...
@@ -252,23 +254,23 @@ static LRESULT OSS_MidiInit(void)
...
@@ -252,23 +254,23 @@ static LRESULT OSS_MidiInit(void)
* it's probably equal or more than wVoices
* it's probably equal or more than wVoices
*/
*/
MidiOutDev
[
i
].
caps
.
wNotes
=
sinfo
.
nr_voices
;
MidiOutDev
[
i
].
caps
.
wNotes
=
sinfo
.
nr_voices
;
MidiOutDev
[
i
].
bEnabled
=
TRUE
;
}
}
MidiOutDev
[
i
].
bEnabled
=
TRUE
;
/* We also have the information sinfo.synth_subtype, not used here
/* We also have the information sinfo.synth_subtype, not used here
*/
*/
if
(
sinfo
.
capabilities
&
SYNTH_CAP_INPUT
)
{
if
(
sinfo
.
capabilities
&
SYNTH_CAP_INPUT
)
{
FIXME
(
"Synthesizer supports MIDI in. Not yet supported.
\n
"
);
FIXME
(
"Synthesizer supports MIDI in. Not yet supported.
\n
"
);
}
}
TRACE
(
"SynthOut[%d]
\t
OSS info: synth type=%d/%d capa=%lx
\n
"
,
i
,
sinfo
.
synth_type
,
sinfo
.
synth_subtype
,
(
long
)
sinfo
.
capabilities
);
}
TRACE
(
"SynthOut[%d]
\t
name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d
\n
"
TRACE
(
"SynthOut[%d]
\t
name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d
\n
"
,
"
\t
OSS info: synth subtype=%d capa=%lx
\n
"
,
i
,
wine_dbgstr_w
(
MidiOutDev
[
i
].
caps
.
szPname
),
i
,
wine_dbgstr_w
(
MidiOutDev
[
i
].
caps
.
szPname
),
MidiOutDev
[
i
].
caps
.
wTechnology
,
MidiOutDev
[
i
].
caps
.
wTechnology
,
MidiOutDev
[
i
].
caps
.
wVoices
,
MidiOutDev
[
i
].
caps
.
wNotes
,
MidiOutDev
[
i
].
caps
.
wVoices
,
MidiOutDev
[
i
].
caps
.
wNotes
,
MidiOutDev
[
i
].
caps
.
wChannelMask
,
MidiOutDev
[
i
].
caps
.
dwSupport
,
MidiOutDev
[
i
].
caps
.
wChannelMask
,
MidiOutDev
[
i
].
caps
.
dwSupport
);
sinfo
.
synth_subtype
,
(
long
)
sinfo
.
capabilities
);
}
}
/* find how many MIDI devices are there in the system */
/* find how many MIDI devices are there in the system */
...
@@ -309,7 +311,7 @@ static LRESULT OSS_MidiInit(void)
...
@@ -309,7 +311,7 @@ static LRESULT OSS_MidiInit(void)
/* Product Version. We simply say "1" */
/* Product Version. We simply say "1" */
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
vDriverVersion
=
0x001
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
vDriverVersion
=
0x001
;
if
(
status
==
-
1
)
{
if
(
status
==
-
1
)
{
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'O'
,
'u'
,
't'
,
' '
,
'
('
,
'#'
,
'%'
,
'd'
,
')
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'O'
,
'u'
,
't'
,
' '
,
'
#'
,
'%'
,
'd
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
wsprintfW
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
,
fmt
,
numsynthdevs
+
i
);
wsprintfW
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
,
fmt
,
numsynthdevs
+
i
);
MidiOutDev
[
numsynthdevs
+
i
].
bEnabled
=
FALSE
;
MidiOutDev
[
numsynthdevs
+
i
].
bEnabled
=
FALSE
;
}
else
{
}
else
{
...
@@ -318,15 +320,11 @@ static LRESULT OSS_MidiInit(void)
...
@@ -318,15 +320,11 @@ static LRESULT OSS_MidiInit(void)
sizeof
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
sizeof
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
MidiOutDev
[
numsynthdevs
+
i
].
bEnabled
=
TRUE
;
MidiOutDev
[
numsynthdevs
+
i
].
bEnabled
=
TRUE
;
}
}
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wTechnology
=
MOD_MIDIPORT
;
/* FIXME Is this right? */
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wTechnology
=
MOD_MIDIPORT
;
/* Does it make any difference? */
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wVoices
=
0
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wVoices
=
16
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wNotes
=
0
;
/* Does it make any difference? */
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wNotes
=
16
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wChannelMask
=
0xFFFF
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wChannelMask
=
0xFFFF
;
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
dwSupport
=
0
;
/* FIXME Does it make any difference? */
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
/* This whole part is somewhat obscure to me. I'll keep trying to dig
/* This whole part is somewhat obscure to me. I'll keep trying to dig
info about it. If you happen to know, please tell us. The very
info about it. If you happen to know, please tell us. The very
...
@@ -340,7 +338,7 @@ static LRESULT OSS_MidiInit(void)
...
@@ -340,7 +338,7 @@ static LRESULT OSS_MidiInit(void)
/* Product Version. We simply say "1" */
/* Product Version. We simply say "1" */
MidiInDev
[
i
].
caps
.
vDriverVersion
=
0x001
;
MidiInDev
[
i
].
caps
.
vDriverVersion
=
0x001
;
if
(
status
==
-
1
)
{
if
(
status
==
-
1
)
{
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'I'
,
'n'
,
' '
,
'
('
,
'#'
,
'%'
,
'd'
,
')
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'O'
,
'S'
,
'S'
,
' '
,
'M'
,
'i'
,
'd'
,
'i'
,
' '
,
'I'
,
'n'
,
' '
,
'
#'
,
'%'
,
'd
'
,
' '
,
'd'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
0
};
wsprintfW
(
MidiInDev
[
i
].
caps
.
szPname
,
fmt
,
numsynthdevs
+
i
);
wsprintfW
(
MidiInDev
[
i
].
caps
.
szPname
,
fmt
,
numsynthdevs
+
i
);
MidiInDev
[
i
].
state
=
-
1
;
MidiInDev
[
i
].
state
=
-
1
;
}
else
{
}
else
{
...
@@ -349,18 +347,17 @@ static LRESULT OSS_MidiInit(void)
...
@@ -349,18 +347,17 @@ static LRESULT OSS_MidiInit(void)
sizeof
(
MidiInDev
[
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
sizeof
(
MidiInDev
[
i
].
caps
.
szPname
)
/
sizeof
(
WCHAR
));
MidiInDev
[
i
].
state
=
0
;
MidiInDev
[
i
].
state
=
0
;
}
}
/* FIXME : could we get better information than that ? */
MidiInDev
[
i
].
caps
.
dwSupport
=
0
;
/* mandatory with MIDIINCAPS */
MidiInDev
[
i
].
caps
.
dwSupport
=
MIDICAPS_VOLUME
|
MIDICAPS_LRVOLUME
;
TRACE
(
"MidiOut[%d]
\t
name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d
\n
"
TRACE
(
"OSS info: midi[%d] dev-type=%d capa=%lx
\n
"
"MidiIn [%d]
\t
name='%s' support=%d
\n
"
"
\t
MidiOut[%d] name='%s' techn=%d voices=%d notes=%d chnMsk=%04x support=%d
\n
"
"
\t
OSS info: midi dev-type=%d, capa=%lx
\n
"
,
"
\t
MidiIn [%d] name='%s' support=%d
\n
"
,
i
,
wine_dbgstr_w
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
),
i
,
minfo
.
dev_type
,
(
long
)
minfo
.
capabilities
,
numsynthdevs
+
i
,
wine_dbgstr_w
(
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
szPname
),
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wTechnology
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wTechnology
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wVoices
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wNotes
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wVoices
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wNotes
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wChannelMask
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
dwSupport
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
wChannelMask
,
MidiOutDev
[
numsynthdevs
+
i
].
caps
.
dwSupport
,
i
,
wine_dbgstr_w
(
MidiInDev
[
i
].
caps
.
szPname
),
MidiInDev
[
i
].
caps
.
dwSupport
,
i
,
wine_dbgstr_w
(
MidiInDev
[
i
].
caps
.
szPname
),
MidiInDev
[
i
].
caps
.
dwSupport
);
minfo
.
dev_type
,
(
long
)
minfo
.
capabilities
);
}
}
wrapup:
wrapup:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment