C++ :: Music Not Playing SDL
Jan 24, 2013
The music that I want to plays not run :( Theoretically all arguments are well, but I don't understand why not works.
if(Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) < 0) {
cout << "Error inesperado";
return 0;
}
Mix_Init(0);
Mix_Music *musica = NULL;
musica = Mix_LoadMUS("pixeluniverse.wav");
if (!Mix_PlayMusic(musica, -1)) {
cout << "Error inesperado";
}
...
View 12 Replies
ADVERTISEMENT
Dec 15, 2014
How does one go about Playing a music file that they picked and playing it in the default player?
I already have this:
#include <iostream>
#include <windows.h>
using namespace std;
int main(){
string wavfile = "C:Documents and SettingsJasonMy DocumentsJasonMy MusicDummy.wav";
[Code] ....
View 5 Replies
View Related
Dec 7, 2013
i am working on a wav file and attempting to make it fade in and fade out but i am lost at the momment.. Check my coding below.
Code: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main ()
[Code].....
View 1 Replies
View Related
Mar 11, 2013
I do not know any of the functions to do this, and when I looked on the internet all the functions I saw were mainly non-standard.
View 12 Replies
View Related
Jan 4, 2014
write a program, pfpq.c, that maintains a priority queue of music tracks (songs) and ratings. The struct is given by:
Code:
struct track
{
char artist[20];
char title[20];
int rating;
};
The program is only designed to demonstrate the concept so get the user to enter a small number of tracks and create a priority queue. (Use an empty string title or an empty string artist to end the program). Print the priority queue as it grows. Your program should initially ask the user if they wish to order the priority queue by rating in ascending order, or by rating in descending order, or if they wish to order the priority queue by artist name. Then build the priority queue accordingly. in the last case, "if they wish to order the priority queue by artist name." which is case 3. How do I sort the priority queue by artist name using in the following code.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pqueue.h"
struct track
{
char artist[20];
char title[20];
int rating;
}
[code]....
View 11 Replies
View Related
Apr 28, 2014
I am writing a music program that will read (from a separate file) a guitar chord and display it to the the user. The format of the separate text file is as follows:
A
|--0--|
|--2--|
|--2--|
|--2--|
|--0--|
|--x--|
B
|--2--|
|--4--|
|--4--|
|--4--|
|--2--|
|--x--|
C
|--0--|
|--1--|
|--0--|
|--2--|
|--3--|
|--3--|
etc...
I want the user to be able to search for a specific chord in the file and how I can make that happen.
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
[Code] .....
View 2 Replies
View Related
Jan 5, 2013
i have a audio file that i want to play via C+.
View 4 Replies
View Related
Apr 4, 2014
I tried playing audio using irrKlang in openGL.But i ended up with some problems.
I have attach my source file and also my output file here.
View 2 Replies
View Related
Aug 8, 2013
I'm thinking of making a horror text-based game, which would use sounds, if you could also tell me of an API to display images in an alternate window that would be nice.
View 6 Replies
View Related
Apr 9, 2014
I am making a game of quiz and i want to play a small clip in one of the rounds, but i dont know how to do it in c++ ....
View 3 Replies
View Related
Mar 26, 2014
I try to play a video I i don't know how.. I searched and i found some tips and articles, but all of it if about Windows Media Player. It's fine, but i need to play something lika an intro an i don't wanna show all that buttons of WMP.. I tried to hide it but no change.
View 2 Replies
View Related
Apr 26, 2013
I can not get the sound to stop playing a cda file with MCI_CLOSE. This code works with wav and mpg and avi files.
LONG WindowProc() {
switch (msg) {
case WM_COMMAND:
if (wParam == IDC_PLAY) {
//A CDA File
SendMessage(m_hwMCI,MCIWNDM_OPENA,0,(LPARAM)&chFile);
[Code] .....
View 1 Replies
View Related
Aug 10, 2014
This is a playing card deck creator and shuffler i made yesterday. It is very simple now, but i believe that it could easily be implemented into a card game program of some sort.
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <ctime>
#define STANDARD_DECK 52
[Code] .....
View 1 Replies
View Related
Oct 22, 2014
Write a program to simulate a deck of 52 playing cards.
Represent your deck as a 2D Array where the value in the cell is the position of the card in the deck. Represent the names for the suits and faces as an array of Strings.
Write an algorithm to shuffle the deck.
Display the deck. For Example:
1 Jack of Spades
2 Deuce of Diamonds
3 Three of Diamonds
4 King of Spades
5 Eight of Clubs
6 King of Diamonds
7 Six of Clubs
8 Six of Spades
9 Eight of Hearts
Deal two hands of five cards each. For Example:
****** HAND 1 ******
Jack of Spades
Three of Diamonds
Eight of Clubs
Six of Clubs
Eight of Hearts
...
Below is what I have so far. Dealing two hands and displaying it. How would I be able to do that?
#include <iostream>
#include <ctime>
#include <string>
using namespace std;
void shuffle(int[][2]);
int main()
{
int j,deck[52][2];
[Code]...
View 2 Replies
View Related
Oct 26, 2014
Write a program to simulate a deck of 52 playing cards.
Represent your deck as a 2D Array where the value in the cell is the position of the card in the deck.
Represent the names for the suits and faces as an array of Strings.
#include "stdafx.h"
#include <iostream>
#include <string>
[Code].....
The problem: I am trying to connect the 1d arrays to the 2d arrays. Right now when I write: cout << deck[3][5] << endl; The output answer is 45. How do I populate the 2d array with the 1d arrays so that when I cout deck[3][5] I get it to say "Six of Spades"?
View 8 Replies
View Related
Oct 25, 2013
I am developing a VC++ application with windows media player component. play video from a video buffer data which i have?
View 2 Replies
View Related
Nov 24, 2014
I got this program to create an array of playing cards and assign the values and suits and shuffle the array. I'm at the point where I need to output the cards but I need to burn the first card by making it output "**" instead of the card. my cards[] is a constant so I can's assign the first card as such.
void showCards(const int cards[], int numCards, bool hideFirstCard) {
if (cards[0]) {
hideFirstCard=true;
cards[0] = '**';
} for(int a = 0; a <= numCards; a++) {
cout >> showCard(cards[a]);
} }
View 1 Replies
View Related