?
Solved

play .wav files from turbo c

Posted on 2003-03-04
3
Medium Priority
?
1,134 Views
Last Modified: 2008-02-01
How to play .wav files from turbo C
0
Comment
Question by:sanaki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
gurry_uor earned 150 total points
ID: 8070334
If you have a player that can be run from the command line (dos prompt) then you can run that player from a c program:

Suppose the command used to run that player is:

c:/> musicplay have_a_cigar.mp3

where have_a_cigar.mp3 is the file to be played. To run this from a C program you can insert the following line in the program:

system("PATH\\musicplay have_a_cigar.mp3");

here PATH is the the path to the directory where the player executable 'musicplay' lies.

Hope this helps.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10088119
Nothing has happened on this question in more than 10 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by gurry_uor [grade B] (I'm not sure the asker wanted an external command).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question