mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:35:42 +01:00
detect attempts to play .mid files with amidi
Complain when the user attempts to play .mid files with amidi.
This commit is contained in:
parent
44cb75c764
commit
556364bbaf
1 changed files with 4 additions and 0 deletions
|
@ -241,6 +241,10 @@ static void load_file(void)
|
||||||
error("cannot read from %s: %s", send_file_name, strerror(errno));
|
error("cannot read from %s: %s", send_file_name, strerror(errno));
|
||||||
goto _error;
|
goto _error;
|
||||||
}
|
}
|
||||||
|
if (length >= 4 && !memcmp(send_data, "MThd", 4)) {
|
||||||
|
error("%s is a Standard MIDI File; use aplaymidi to send it", send_file_name);
|
||||||
|
goto _error;
|
||||||
|
}
|
||||||
send_data_length = length;
|
send_data_length = length;
|
||||||
goto _exit;
|
goto _exit;
|
||||||
_error:
|
_error:
|
||||||
|
|
Loading…
Reference in a new issue