{"action":"created","issue":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/195","repository_url":"https://api.github.com/repos/stsp/dosemu2","labels_url":"https://api.github.com/repos/stsp/dosemu2/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/stsp/dosemu2/issues/195/comments","events_url":"https://api.github.com/repos/stsp/dosemu2/issues/195/events","html_url":"https://github.com/stsp/dosemu2/issues/195","id":159988980,"number":195,"title":"System Beeps","user":{"login":"kalpha2","id":12398407,"avatar_url":"https://avatars.githubusercontent.com/u/12398407?v=3","gravatar_id":"","url":"https://api.github.com/users/kalpha2","html_url":"https://github.com/kalpha2","followers_url":"https://api.github.com/users/kalpha2/followers","following_url":"https://api.github.com/users/kalpha2/following{/other_user}","gists_url":"https://api.github.com/users/kalpha2/gists{/gist_id}","starred_url":"https://api.github.com/users/kalpha2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalpha2/subscriptions","organizations_url":"https://api.github.com/users/kalpha2/orgs","repos_url":"https://api.github.com/users/kalpha2/repos","events_url":"https://api.github.com/users/kalpha2/events{/privacy}","received_events_url":"https://api.github.com/users/kalpha2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-06-13T16:15:37Z","updated_at":"2016-06-16T16:40:20Z","closed_at":null,"body":"If dosemu(1or2) is installed on a unit without an internal speaker but has external speakers, should the FreeDOS cmd Beep still emit a sound?\r\nThe FreeDOS cmd Beep works on units I have with internal speaker/buzzer but not on those without.\r\nfrom a terminal I tried  echo -e \"\\007\"\r\nthis does nothing, but as per a google suggestion if you do (and if you have permission)\r\necho -e \"\\007\" > /dev/tty5\r\ndoes beep ... not sure why ... and apparently it does rely on knowing a tty is available and unused?\r\nIs it possible to do via a config setting change to allow the above or redirect to the external speakers somehow... maybe making use of the (debian) beep package?\r\n\r\nas a test I tried the following (on a unit with the debian package \"beep\" installed)\r\n = = = = =  \r\n--- speaker_orig.c\t2016-06-07 20:52:28.000000000 +0100\r\n+++ speaker.c\t2016-06-10 13:56:41.924515798 +0100\r\n@@ -93,7 +93,8 @@\r\n \r\n static void dumb_speaker_on(void * gp, unsigned ms, unsigned short period)\r\n {\r\n-\tputchar('\\007');\r\n+\t//putchar('\\007');\r\n+\tsystem(\"beep \");\r\n }\r\n static void dumb_speaker_off(void *gp)\r\n {\r\n = = = = =  \r\nfew things of note ... \r\n1. This worked .... but get a variable number of beeps (usually about 3). \r\n     From console \"beep\" issues a single beep, but from FreeDos/Dosemu2-pre5 I get variable \r\n      number of beeps.\r\n     I also substituted the \"beep \" with an \"aplay /usr/share/sounds/sound.wav \" this also worked \r\n      but again the wav file gets played multiple times.\r\n     Is this because it is linked in with timer somehow, and the putchar('\\007') normally executes so\r\n      quickly it will do it the once, but instantiating beep or aplay causes the multiple?\r\n     When called from within a DOS program, it is noticeable that the DOS program is \"paused\" while\r\n      these multiple beeps (or wavs) are played before it will continue.\r\n2. Is \"system\" a bad idea (for more than one reason)?\r\n     There seems to be some suggestions that it is bad, and a spawned pid should be created.\r\n     The code (and dependencies) seemed far more involved for that, hence my quick test was\r\n     with only using system."},"comment":{"url":"https://api.github.com/repos/stsp/dosemu2/issues/comments/226542315","html_url":"https://github.com/stsp/dosemu2/issues/195#issuecomment-226542315","issue_url":"https://api.github.com/repos/stsp/dosemu2/issues/195","id":226542315,"user":{"login":"kalpha2","id":12398407,"avatar_url":"https://avatars.githubusercontent.com/u/12398407?v=3","gravatar_id":"","url":"https://api.github.com/users/kalpha2","html_url":"https://github.com/kalpha2","followers_url":"https://api.github.com/users/kalpha2/followers","following_url":"https://api.github.com/users/kalpha2/following{/other_user}","gists_url":"https://api.github.com/users/kalpha2/gists{/gist_id}","starred_url":"https://api.github.com/users/kalpha2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalpha2/subscriptions","organizations_url":"https://api.github.com/users/kalpha2/orgs","repos_url":"https://api.github.com/users/kalpha2/repos","events_url":"https://api.github.com/users/kalpha2/events{/privacy}","received_events_url":"https://api.github.com/users/kalpha2/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T16:40:20Z","updated_at":"2016-06-16T16:40:20Z","body":"just tried your patch .... it works for the freedos \"beep\" cmd. \r\nBut the powerbasic exe still emitted three times.\r\nCan I debug / trace this somehow to see where / why it calls, or what the port 61 value is?\r\nWhere did you get the & 3 from ?"}}
{"actor":{"display_login":"kalpha2"}}