Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 31st, 2005, 12:56 PM   #11
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
That would be /dev/sound.
Cerulean is offline   Reply With Quote
Old Aug 31st, 2005, 1:33 PM   #12
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Quote:
Originally Posted by Cerulean
That would be /dev/sound.
Not for many systems. It's usually /dev/dsp
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Aug 31st, 2005, 1:36 PM   #13
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3 Polyphemus_ is on a distinguished road
Hey, this is fun:

cat /usr/bin/as /dev/dsp

one problem: it never stops :p


EDIT: 200 posts
Polyphemus_ is offline   Reply With Quote
Old Aug 31st, 2005, 3:16 PM   #14
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3 Polyphemus_ is on a distinguished road
why can't you edit posts?

dd if=nameoffile of=/dev/dsp

works better.. you get nice sound, btw
Polyphemus_ is offline   Reply With Quote
Old Sep 1st, 2005, 12:39 PM   #15
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
Not for many systems. It's usually /dev/dsp
Yeah. Some distros set the symlink from /dev/dsp to /dev/sound.
Cerulean is offline   Reply With Quote
Old Sep 1st, 2005, 12:58 PM   #16
2roll4life7
Programmer
 
2roll4life7's Avatar
 
Join Date: Aug 2005
Location: 0x0010 * 0x0091 + 0x0004
Posts: 65
Rep Power: 3 2roll4life7 is on a distinguished road
Quote:
Originally Posted by Infinite Recursion
it died on me... can't open file
It died on me too at first, but then I realized I just had to make the explorer.bak file myself from a copy of explorer. Nice DaWei!
__________________
#if 0 /* in case someone actually tries to compile this */
- libpng version 1.2.8 (example.c)

<Jim_McNeat> Is there like a way to put a compiler in "Just trust me on that one" mode?
2roll4life7 is offline   Reply With Quote
Old Sep 1st, 2005, 3:23 PM   #17
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,466
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Thanks 2roll4life7... that was my problem as well... Cool stuff DaWei
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Sep 1st, 2005, 3:44 PM   #18
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Well, I should have put the copying into the code, up at the top. Comes from not thinking about one's users as one should. Thanks for the comments.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 1st, 2005, 6:12 PM   #19
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I altered it so it used argv[1] instead. It's pretty funky.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 1st, 2005, 8:00 PM   #20
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Yeah, that too. It would have been simple. Then I thought about validating it. Then I thought about PROPERLY validating it. So, naturally, I said, "Hell with it" . Next time, I'll take the opportunity to put in a comment:

// Use of the command line arguments for the file to be played is left as an
// exercise for the reader.

I just LOVE opportunities to say that .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC