|
| 13 Apr 2013 01:01 AM |
| So I was wondering if it was possible to play a sound file, with just the built in features in my dev bloodshed C++ compiler. Also why is it that when I download code blocks, and I go to Win32 project when I run the code that they provide it errors? |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 13 Apr 2013 01:13 AM |
What you HAVE to understand about C++ and any other lower level programming language, is that the compiler and the language itself isn't there to hand hold you to your objective.
You're going to have to use operating system specific functions, or use a library. There isn't any built in features with any compiler. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 01:16 AM |
| I could not think of the correct term for it. I guess I will just have to wait and get a new computer and use SDK. >.> |
|
|
| Report Abuse |
|
|
Aslum
|
  |
| Joined: 09 Dec 2011 |
| Total Posts: 7937 |
|
|
| 13 Apr 2013 04:17 AM |
If this isn't Lua I'm not helping.
I made a Python post and idiots go and report it. |
|
|
| Report Abuse |
|
|
iStone4S
|
  |
| Joined: 07 May 2012 |
| Total Posts: 416 |
|
| |
|
Aslum
|
  |
| Joined: 09 Dec 2011 |
| Total Posts: 7937 |
|
| |
|
iStone4S
|
  |
| Joined: 07 May 2012 |
| Total Posts: 416 |
|
| |
|
|
| 13 Apr 2013 04:47 AM |
1. That IDE is really outdated and was relevant maybe 10 years ago. Even though there is a version which is being maintained its still evil. Switch to MSVC express (2010/2012) or possibly codeblocks or something.
2. In C++ you get practically nothing related to IO built-in except for some simplified file reading functionality and command window stuff. You need a library for actual input (keyboard, mouse, fancy file reading) and output (graphics, sound, interwebs) |
|
|
| Report Abuse |
|
|
Aslum
|
  |
| Joined: 09 Dec 2011 |
| Total Posts: 7937 |
|
| |
|
|
| 13 Apr 2013 02:08 PM |
| Uhm, thanks also sorry about your thread. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 02:09 PM |
| What would be better for my audio needs SFML, or OpenAL? |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 13 Apr 2013 02:38 PM |
| Either choice is fine. OpenAL is specifically for audio, whereas SFML is for window management, OpenGL drawing, easier window creation etc. If you don't want those add-ons you can only include the audio header. |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 13 Apr 2013 02:52 PM |
| As radio said, C++ is just a language, you can't do such things without a library that interfaces with the hardware... the Windows API contains the PlaySound function. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 03:13 PM |
| It's a rather annoying language when it comes to downloading a ton of library's, also I think I will go with OpenAL, I will have to wait and get a new pc or laptop though, but thanks for all the help guys. |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 13 Apr 2013 03:27 PM |
>library's, Incomplete noun...? |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 03:29 PM |
| You should just ignore audio and instead add random guis that say *boom* or *relaxing adventure music* or wateva. |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2013 05:21 PM |
| I am making a key bind type of thing were when you press certain keys certain music files play, so I have to have a audio library. |
|
|
| Report Abuse |
|
|
oSo
|
  |
| Joined: 01 Dec 2007 |
| Total Posts: 808 |
|
|
| 13 Apr 2013 08:57 PM |
| Use the basic include studio.h |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 13 Apr 2013 09:32 PM |
| ^That has nothing to do with this, and it's called stdio.h |
|
|
| Report Abuse |
|
|
iStone4S
|
  |
| Joined: 07 May 2012 |
| Total Posts: 416 |
|
|
| 13 Apr 2013 09:34 PM |
| ^The guy above you doesn't know it means standard i/o. xD |
|
|
| Report Abuse |
|
|