I'm writing the audio part of a game, and I'm using OpenAL. I want to use some extensions, but the tests always fail:
TRACE: AudioManager - Sound device: 'Generic Software'
TRACE: AudioManager - Enabling OpenAL extensions...
TRACE: AudioManager - Compressor support: NO
TRACE: AudioManager - Reverb support: YES
TRACE: AudioManager - Chor...
I am trying to create an audio watermarking system. I figure the best solution is to create an audio file (WAV) based on a unique string of text and then combine this with the original wav.
The part that makes this tricky (for me anyway) is:
How do I convert the text string to a wav?
How do I ensure that the resulting WAV form is inau...
Hi,
Suppose I'm given a class A. I would like to wrap pointers to it into a small class B, some kind of smart pointer, with the constraint that a B* is automatically converted to an A* so that I don't need to rewrite the code that already uses A*.
I would therefore want to modify B so that the following compiles...
struct A {
void...
hello.
I am using gcc on linux to compile C++ code.
There are some exceptions which should not be handled and should close program.
However, I would like to be able to display exception string:
For example:
throw std::runtime_error(" message"); does not display message, only type of error.
I would like to display messages as well.
Is ...
Hi there,
i figured I must use a MEX-File to output Digital pulses in a loop (40 kHz) from Matlab to my DAQ-Board, I have some APIs from the DAQ-Board vendor, but I really dont know if they are useful.
It´s a big documentation on the Mathworks website about MEX-File and APIs, that just make me confused.
So I´m asking here if someone ca...
i have several objects on my scene. i want to apply my shader to one of them only. Environment: OpenGL 2.0, C++, GLUT, GLEW.
...
I'm currently working on a small MFC program that outputs data from a mysql database.
I can get output when i'm using an sql statement that does not contain any variable eg.
select album from Artists;
but when i try to use a variable the program compiles but i get no output eg.
mysql_perform_query(conn,select album from Artists w...
This is how the program looks and i need to make all integers with different name. Like x,x1,x2 and so on...
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream iFile("input.txt"); // input.txt has integers, one per line
while (true) {
int x;
iFile >> x;
if( i...
I want to get path stroke from image using opencv. I know how to get contours but I need path of stroke (path that runs through the center of the stroke). Is it possible to get this in opencv ?
...
Hi,
I work on a global trading system which supports many users. Each user can book,amend,edit,delete trades. The system is regulated by a central deal capture service. The deal capture service informs all the user of any updates that occur.
The problem comes when we have crashes, as the production environment is impossible to re-creat...
I'm using OTT to pass and load an Object Type from a C++ external procedure. The problem I have is that I don't know how to somehow mark the object for deallocation once extproc has done marshalling it. The object remains in extproc's memory forever making it grow in memory consumtion. Here's part of the code:
void decodeFromBuffer(OCIE...
Hello! I have to work with an application in C++ similar to a phone book: the class Agenda with an STL list of Contacts.Regarding the contacts hierarchy,there is a base-class named Contact(an abstract one),and the derived classes Friend and Acquaintance(the types of contact).
These classes have,for instance, a virtual method called...
I have a thread pool with some threads (e.g. as many as number of cores) that work on many objects, say thousands of objects. Normally I would give each object a mutex to protect access to its internals, lock it when I'm doing work, then release it. When two threads would try to access the same object, one of the threads has to wait.
No...
How would I manually concatenate two char arrays without using the strncpy function?
Can I just say char1 + char2?
Or would I have to write a for loop to get individual elements and add them like this:
addchar[0] = char1[0];
addchar[1] = char1[1];
etc
etc
addchar[n] = char2[0];
addchar[n+1] = char2[1];
etc
etc
To clarify, if
char1 =...
class Equipment
{
std::vector<Armor*> vEquip;
Weapon* mainWeapon;
int totalDefense;
int totalAttack;
public:
unsigned int GetWeight();
int * GetDefense();
bool EquipArmor(Armor* armor);
bool UnequipArmor(Armor* armor);
bool EquipWeapon(Weapon* wep);
bool UnequipWeapon(Weapon* wep);
Equipm...
I'm just messing around with some C++ at the moment trying to make a simple tic-tac-toe game and I'm running into a bit of a problem. This is my code:
#include <iostream>
using namespace std;
class Square {
public:
char getState() const;
void setState(char);
Square();
~Square();
private:
char * pState;
};
class Boa...
I have two basic Cpp tasks, but still I have problems with them. First is to write functions mul1,div1,sub1,sum1, taking ints as arguments and returning ints. Then I need to create pointers ptrFun1 and ptrFun2 to functions mul1 and sum1, and print results of using them. Problem starts with defining those pointers. I thought I was doing i...
I'm a new-ish C++ programmer, and I'm doing my first program on my own using C++. I decided I would like to use JSON to store some of the data I'm going to be using, and I've found a library to handle JSON, JsonCpp.
I've installed the library using my Linux system's package manager, and in my C++ code, I've used in my source code file
...
I know there are many other questions similar to this one, but none of the solutions posited there are working for me
Basically, making the SDK sample files, i get /usr/bin/ld: cannot find -lcuda
which would be an easy enough 'find the library and throw it to ldconfig', except ldconfig already says it has it...
$ sudo ldconfig -v | gr...
Hi, everyone !
I need to call some DOS interrupts (Services) from a C/C++ program, I tried the following inline asm code:
(Read a character)
int main()
{
asm(
"movb $0x01, %ah;"
"int $0x21"
);
system("PAUSE");
}
But it did not work ! I would like to know what have i done wrong here ! Also if there is another way to call dos interr...