Hello, I am trying to create a tone, then another tone using this code. It currently only plays one of them. Is there something missing or am i going about this wrong? for(int n = 0; n < num_samples; n++) //where n is the step |start of for loop { int fr = 523; //Frequency A data[n] = amp*sin(2*pi*fr*n/fs); cout << n << "\t" << data <<"\n"; } // | end of for loop for(int n = 0; n < num_samples; n++) //where n is the step |start of for loop { int fre = 587; //Frequency B data[n] = …

Member Avatar
Member Avatar
+0 forum 2

Shows you how to play sound files with the pySFML module and Python.

Member Avatar
Member Avatar
+2 forum 1

I am trying to play a wav file form a projects resources. I found this example: [Click Here](http://www.daniweb.com/software-development/csharp/code/258293/add-sound-file-into-resource-and-access-it.-in-.net-c) I imported two wav files per instructions named "Button.wav" and "Stop.wav". I commented out this line `Stream soundStream;` because it did not seem to belong. When I run the code the sound files do not play, but I do get the "Windows Ding" sound. This is issue is not critical, just a proff of principle for me at this point. fyi... I tried it with and without `Stream soundStream;` before posting. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using …

Member Avatar
Member Avatar
+0 forum 9

HI, I am trying to convert an audio file that is in wav format to mp3 format. I have installed apache and I am using windows 8. I downloaded the files for ffmpeg and tried to run the php script and convert the file but no success. What I am doing is in the exec command I am giving the path to ffmpeg.exe and calling the convert command. Here is my code. $ffmpeg = $_SERVER['DOCUMENT_ROOT'].'/ffmpeg_test/bin/ffmpeg.exe'; exec($ffmpeg.' -i 10001_pre.wav file.mp3',$out,$return); Now when I try to print the out variable it does not show me any thing. Can any one tell me …

Member Avatar
Member Avatar
+0 forum 3

Allright. It's me again. :D This time, I'm making an alarm clock program. I've already completed the bit that gets and displays the system time: Date vrijeme = new Date(); int sati = vrijeme.getHours(); int minuti = vrijeme.getMinutes(); int sekunde = vrijeme.getSeconds(); Also made a method that compares that time to the desired alarm time: public void prikažiVrijeme(){ Variables V1 = new Variables(); trenutnoVrijeme.setText(String.valueOf(V1.sati)+":"+String.valueOf(V1.minuti)+":"+String.valueOf(V1.sekunde)); V1.upamćenoVrijeme = String.valueOf(V1.sati)+":"+String.valueOf(V1.minuti); traženoVrijemeGUI.setText(sat.getText()+":"+minut.getText()); V1.traženoVrijeme = sat.getText()+":"+minut.getText(); if (provjeraVremena(V1.upamćenoVrijeme, V1.traženoVrijeme)){ // PLAY MP3 HERE } } public boolean provjeraVremena(String upamćeno, String traženo){ boolean provjeravanje = false; if (upamćeno.equals(traženo)){ provjeravanje = true; } return provjeravanje; } Tested …

Member Avatar
Member Avatar
+0 forum 9

I have a problem with this... import javax.swing.*; import sun.audio.*; import java.awt.event.*; import java.io.*; public class PikaPlatformer { //----------------------------------------------------------------- // Creates and displays the application frame. //----------------------------------------------------------------- public static void main (String[] args) { JFrame frame = new JFrame ("Direction"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.getContentPane().add (new PikaPlatformerPanel()); frame.pack(); frame.setVisible(true); } } How would I insert sound into this I just want music to play in my game. Any suggestions?( this is just the jFrame)

Member Avatar
Member Avatar
+0 forum 16

Hi, I have to design a program that plays sounds (from WAV files). I have to create a wav and play it. Once it finishes I have to change the contents of that wave file and play it again. It is like playing a wave file that is constantly changing. I thought of creating a stream but the problem is when i edit that stream (using ms.Postion and ms.WriteByte), an error occurs saying that "the wave header file is corrupt". The following is my code: [CODE] MemoryStream ms = new MemoryStream(Sample1); SoundPlayer myPlayer = new SoundPlayer(ms); myPlayer.Play(); //Wav file plays …

Member Avatar
Member Avatar
+0 forum 1

Alright, I'm at it again, trying another version of my game. Sorry, it's been a while since I've been here and while I tried checking to see if anyone else had asked about this, I didn't see anything that was to the point. I'm trying to play an mp3 or wav file by simply mousing over a label, thus using the below: [CODE]Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)[/CODE] But I'm confused as to how to what I play this with. I don't want a player, just a song to play. I'd like …

Member Avatar
Member Avatar
+0 forum 1

I recently installed the updated Dell Support Center (DSC) onto my Inspiron 1520 with Win XP(SP3) and ran the included PC Checkup (PCC) powered by PC-Doctor. Everything went smoothly; however, a little later, I started to notice a random .wav sound (a click followed by a "bubbling" sound like someone pouring liquid out of a bottle) occurring in the background even when DSC/PCC was closed. I initially thought this sound was related to some malware that recently attacked my PC, but I have run every clean-up tool possible, including several AV programs, Malwarebytes, Trojan Remover, ComboFix, and various bootkit detectors, …

Member Avatar
Member Avatar
+0 forum 7

Exactly that. Using NAudio or DirectX, can someone show me how to convert a wav file to mp3. Mp3 to wav seems trivial, but unfortunately i need wav to mp3. Thank you for your help

Member Avatar
Member Avatar
+0 forum 2

I've seen earlier posts for this problem, but the solutions don't apply to me, and the earlier posts are a couple of years old. I was hit on 6/5/11 with malware from a legitimate website that I had accessed just the day before with no problems. Malwarebytes (MBAM) identified the culprits as Trojan.Agent.GD and Trojan.FakeMS. These trojans installed a start-up program called NfeiQASGux and ran from a program called 26992420.exe on my PC. I thought MBAM had scrubbed the trojans, but I found later that I could hear a .wav sound in the background that occurred randomly whether or not …

Member Avatar
Member Avatar
+0 forum 9

Hi, I have 2 applet problems. 1) I uploaded a new jar file to server to replace old one. When I load web page in browser for that applet (on this pc), I keep getting the old jar file getting loaded as the applet (even on different browsers on this pc). But when I run the web page on laptop, the newly updated jar gets loaded(as expected). Its been doing this for about 3 days, I really don't get how this old applet is loading into pc, really confusing me. 2) I have the same (jar file and 'res' folder) …

Member Avatar
Member Avatar
+0 forum 1

The End.