Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TeGeek

Pages: [1]
1
Audio / Re: Error loading audio file
« on: January 17, 2020, 11:44:23 am »
its a type but that wasnt the issue got it solved by a friend. issue was with it being in debug instead of realease mode.

2
Audio / Re: Error loading audio file
« on: January 17, 2020, 11:04:18 am »
so this is from when i tried to get sound to work on a seperate file and its not working


Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>z
#include <iostream>
#include <fstream>
#include <sstream>
#include <streambuf>


using namespace std;

#ifdef _DEBUG
#pragma comment(lib, "sfml-window-d.lib")
#pragma comment(lib, "sfml-system-d.lib")
#pragma comment(lib, "sfml-graphics-d.lib")
#pragma comment(lib, "sfml-audio-d.lib")
#else
#pragma comment(lib, "sfml-window.lib")
#pragma comment(lib, "sfml-system.lib")
#pragma comment(lib, "sfml-graphics.lib")
#pragma comment(lib, "sfml-audio.lib")
#endif


int main()
{

sf::SoundBuffer buffer;
if (!buffer.loadFromFile("sounds/canary.wav"))
{
std::ofstream file("sfml-log.txt");
std::streambuf* previous = sf::err().rdbuf(file.rdbuf());
cerr << "i wantt more debuf info than this";
return -1;
}

sf::Sound death;

death.setBuffer(buffer);

death.play();

getchar();
return 0;
}

3
Audio / Re: Error loading audio file
« on: January 17, 2020, 10:03:22 am »
ok so i got the sound example to work and it plays the sound without problem. i tried putting the sound file the the example used in my project at the working path location but it still fails to load.

what is the code i need to use to get sfml to print out error since what im trying to use isnt working.

4
Audio / Re: Error loading audio file
« on: January 16, 2020, 04:33:24 pm »
i still get the same error after copying the dll to the executable

5
Audio / Re: Error loading audio file
« on: January 16, 2020, 10:33:12 am »
do you mean the sound example in the sfml folder?

if thats what you mean i cant run the exe file cause it says im missing OpenAL32.dll

6
Audio / Re: Error loading audio file
« on: January 16, 2020, 08:01:11 am »
im not able to get any sound file to work even in a program that just plays the sound

and yes they refer to the same thing

7
Audio / Re: Error loading audio file
« on: January 13, 2020, 02:59:36 pm »
i dont know how to get sfml error to show since i currently am not getting any error apart from the error message i added to show when the file fails to load.

tried some stuff with sf::err() but im not sure if im using it properly currently have it like this

Code: [Select]
if (!buffer.loadFromFile("death.wav"))
{
std::ofstream file("sfml-log.txt");
std::streambuf* previous = sf::err().rdbuf(file.rdbuf());
}

8
Audio / Re: Error loading audio file
« on: January 12, 2020, 05:06:44 pm »
so i changed the working directory and put the sound file in that folder but im still unable to load the file

9
Audio / Re: Error loading audio file
« on: January 12, 2020, 12:48:25 pm »
ive tried several different types of pathing and what im expecting to be default would be in my x64 folder inside my bin.

is there any way to get it to show more info when it fails?

10
Audio / Re: Error loading audio file
« on: January 12, 2020, 09:18:09 am »
i get the error i wrote to get when it fails to load which is "error loading the sound file"

11
Audio / Error loading audio file
« on: January 12, 2020, 12:55:28 am »
So i have an issue where when im trying to load my wav sound file into the soundbuffer it just doesnt work i have tried with multiple files and different types of file paths but i keep getting error while trying to link the file.

 
Code: [Select]
if (!buffer.loadFromFile("sample.wav"))
{
cout << "error loading the sound file" << endl;
}
deathSound.setBuffer(this->buffer);

12
Audio / Re: Audio linking error
« on: January 11, 2020, 05:35:41 pm »
no i didnt thought i only had to include the audio. but i did and it works now

thanks

13
Audio / Audio linking error
« on: January 11, 2020, 04:27:13 pm »
so im getting linking error when im trying to use sf::sound and sf::soundbuffer but i have the sfml/audio.hpp included in the same file im working in.

Pages: [1]
anything