LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-30-2007, 12:59 PM   #1
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Rep: Reputation: 30
Question Sound input/output using C


Hi,

I want to write a C program that will output sound to the speakers on a laptop that runs the Fedora Core 6. Is there a standard library to do this? I am kind of stuck to even start!

Thanks,
Ashlesha.
 
Old 03-30-2007, 01:12 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,857

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
check out the ALSA framework, should be simple enough, not that i've ever used it myself. ALSA is the current audio framework supported within the kernel. you could use desktop centric libraries like ARTS (KDE) and ESD (Gnome) but i don't think they really offer much more than alsa itself. additionally you can play back sound via SDL, normally thought of as a graphics library. but essentially anything that isn't ALSA sits on top of ALSA...
 
Old 03-30-2007, 01:12 PM   #3
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
Ok, so there must be a port number or something similar that I can write the sound output to right? how do i find it?
 
Old 03-30-2007, 01:13 PM   #4
ashlesha
Member
 
Registered: May 2005
Location: PA
Distribution: Ubuntu
Posts: 204

Original Poster
Rep: Reputation: 30
great -- Thanks Chris -- hadnt seen your message before I responded!

Cheers,
Ashlesha.
 
Old 04-02-2007, 03:09 PM   #5
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-12/ fc-11-live-usb/ aix
Posts: 1,951

Rep: Reputation: 158Reputation: 158
may i also suggest looking at the source of 'play'.
 
Old 04-02-2007, 03:30 PM   #6
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
SDL provides a simple (and portable) interface to the sound system.. i would bet (based on absolutely nothing) that it (SDL) is easier to use that ALSA..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound Input/output error SoreMeatGrinder Linux - Hardware 3 06-23-2006 03:24 AM
no output/input Logitech 350 usb with cmi 8738 chip set sound board installed marvinudy Linux - Hardware 0 05-08-2006 04:27 PM
Input/output error greenthing Linux - Software 4 04-28-2005 09:54 AM
Input/Output Error lwcangus Linux - Software 0 02-06-2005 08:59 PM
Input/output error Sn4s Linux - Hardware 6 07-26-2004 07:38 AM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration