Skip to content

Commit cfd6ab2

Browse files
oss: set default audio format when unset (fixes #3211)
1 parent 963ecec commit cfd6ab2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/oss/oss.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ oss_init (void) {
137137
return -1;
138138
}
139139

140+
if (!plugin.fmt.channels) {
141+
// generic format
142+
plugin.fmt.bps = 16;
143+
plugin.fmt.is_float = 0;
144+
plugin.fmt.channels = 2;
145+
plugin.fmt.samplerate = 44100;
146+
plugin.fmt.channelmask = 3;
147+
plugin.fmt.flags &= ~DDB_WAVEFORMAT_FLAG_IS_DOP;
148+
}
149+
140150
oss_set_hwparams (&plugin.fmt);
141151

142152
mutex = deadbeef->mutex_create ();

0 commit comments

Comments
 (0)