Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello. I'm new to coding. I'm trying to add an audio file to a code as practice. I have a file in mind, but I don't know how to add it to the code. I'd really appreciate a step by step answer please


What I have tried:

<pre lang="text"> <audio> src="i dont know how to add the audio file"> 
</audio>
Posted
Updated 9-Nov-21 19:55pm
Comments
Mohibur Rashid 9-Nov-21 22:32pm    
Usually, you do not add audio file in your source, you add them in your resource. based on technology and tool method would vary. But, one thing would be common. You would read from the resource file itself, you are not going add binary in your source code directly

1 solution

Exactly how you would do that will depend on the language and environment you are working with: a web-based solution would be very different to a WinForms solution for example, and a PHP or WPF solution would be different again.

So start by thinking about where your code runs, and what language it is written in. Then it's over to Google to see what you can find - we can't give you anything like precise answers to a general question like this!
If you can get more specific once Google has done its thing we may be able to help - but at the moment any advice we gave would almost certainly be wrong!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900