(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 25 Feb 2021, 23:23
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Xterm Beep problems?
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
James186282


Joined: 08 Sep 2009
Posts: 270
Location: Minnesota

PostPosted: Wed 23 Sep 2009, 17:25    Post subject:  Xterm Beep problems?  

Hi everyone. I'm coming slowly up to speed on the C++ compiler and have written some routines to print text on the terminal in various colours and locations. One thing thats driving me mad is the inability to send the bell character (Control G) to the screen and get any sound. I can set the terminal to visual beep and get the screen to blink but no "blinking" sounds no matter what I do. Is there some dumb thing I'm doing wrong? I can play an MP3 with ALSA Player and I've looked at the mixer and think all the sliders are wide open for max volume.

I've also tried to compile a beep program that sends sound out via the sound card and thats just as silent.

Sorry for these new guy (idiot) questions.
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Wed 23 Sep 2009, 18:57    Post subject:  

Try modprobe pcspkr
(If the command runs successfully, there will be no output. It only outputs stuff when there is an error).

No idea if this will work, but I think the pcspkr module is a requirement at least. I tend to unload it (with rmmod) because it gets annoying having to listen to all the beep-beep-beeping when I hit too many backspaces or whatever.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
James186282


Joined: 08 Sep 2009
Posts: 270
Location: Minnesota

PostPosted: Sat 03 Oct 2009, 14:52    Post subject:  

Thanks. I tried it but no go. My C program beeps through the sound card which worked for a while when I had just reloaded puppy 4.3 from scratch. (Partition) I can play an MP3 on Aqualung but....

On the same topic everytime I restart the computer the system defaults to all sounds muted. This is really annoying and I would love a solution to both of these problems.

THANKS!
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Sat 03 Oct 2009, 15:22    Post subject:  

You can save and restore the audio settings with these:
Code:
alsactl store
alsactl restore

I don't know about Puppy 4.3, but in 4.1.2 Puppy automatically stores the settings when it shuts down and loads them when it boots.


As for the beeping, I just investigated a little. Try running alsamixer and scrolling over to the right to see if there's a "PC Speaker" slider. If so, fiddle with that. On my end, if I have that muted the buzzer on the motherboard (and thus the pcspkr) module is used. If I unmute it the real speakers are also used, unless I increase the volume beyond 70% or so, where they stop beeping. (You toggle the muted-ness with the 'm' key.)

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
James186282


Joined: 08 Sep 2009
Posts: 270
Location: Minnesota

PostPosted: Sun 04 Oct 2009, 12:24    Post subject: Xterm Beep problems [SOLVED]  

Whew... Scroll to the right?? I just sat looking at the first page of sliders in this mixer program. I had NO clue that there were more.... SIGH.....

I really REALLY appreciate your help. All my "BEEPING" software works fine now Wink And one of the great hair pulling out sessions of all time is at an end at last. The only question left is this. Would I put this "restore" routine into what script? I see all the routines flash by until it gets to starting X but I am such a noob I don't know what file this is running from to check it and or add it to.

Mega - THANK YOU!!!!
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Sun 04 Oct 2009, 12:32    Post subject:  

Use /etc/rc.d/rc.local for things that should run on bootup. If you need something to run different code on both bootup and shutdown, you could instead made a script in /etc/init.d/. Every executable file in /etc/init.d/ is automatically run with the "start" parameter during bootup and the "stop" parameter during shutdown. So in your case, you could use something like this:
Code:
#!/bin/sh
if [ "$1" = "start" ]; then
    alsactl restore
elif [ "$1" = "stop" ]; then
    alsactl store
fi

(Don't forget the spaces around the brackets or it will break, and don't forget to set the script executable.)


Another thing to know about alsamixer is that you can press the TAB key to toggle between 'input', 'capture', and 'all' modes.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.9435s ][ Queries: 12 (0.8880s) ][ GZIP on ]