Juce Demo File Playback not playing music


#1

I’ve tried a fair amount of times changing the sample rate in the setsource parameters. But when I run the demo and click the play button, it doesn’t work.

Does anyone know which part of the demo might be the problem?


#2

Very hard to guess what you’ve done wrong from only a description of what you were trying to do…


#3

Speakers not turned on…? :wink:


#4

I was just trying to playback a song file like what the playback demo was supposed to do, didn’t get any sound.


#5

Very unlikely that anyone can help based on a question like this without more solid info.


#6

In the big juce demo. There’s a file playback demo, which reads audio files and allows you to play them. So I checked that out. Chose my audio file; the file playback demo displayed the audio waves patterns. And there there was a play button to play the selected audio file. I pressed that, I even waited one minute, and it still doesn’t play. Had my speakers on, cranked upthe system’s volume. No audio.


#7

Ah ok, thought you were talking about your own code.

Well, the demo certainly works on all the devices we’ve tested, what are you running on? Have you tried tweaking the audio settings for sample rate, output device etc?


#8

I’m run vs 2015 with juce on win 7. I did try tweaking the sample rate; 48000 was what my speakers rate (is bitrate and samplerate the same thing?). There is this audio settings demo thing in the big demo, is that part of the file playback demo?


#9

Actually I figured it out! It was the Audio settings demo. I just had to set the output to my speakers! :slight_smile:


#10

I also am unable to play the files, though I can see the thumbnails, while using AudioPlaybackDemo from the Examples folder in the ProJucer. This is with JUCE 5.3.2 and MS VS2017. I have no problem playing files using the tutorial “PlayingSoundFiles” however. The only difference I can see is that the demo inherits from Component instead of from AudioAppComponent. I tried running the Settings example, which does produce a sine tone after I select my audio device. But the PlayingSoundFiles works without the need to run a Settings dialog. I am curious as to why.


#11

I also just noticed that if I run AudioSettings demo from Examples within the ProJucer instead of exporting to MS VS 2017, that the ProJucer crashes.


#12

I can’t reproduce either of these on Windows 10, VS2017. Are you using the latest tip of the develop branch?


#13

Hi Ed. Thanks for your response. I’m using JUCE 5.3.2 with MS VS Express 2017 version 15.7.1 (MS .NET v 4.7.02558) in a Windows 8.1 environment. I’m not sure what you mean by the latest tip of the develop branch, so I can’t answer that question.


#14

It could be an issue with your audio device settings - can you try running the DemoRunner application and seeing if the example works there? You should be able to change the audio device settings via the “Settings” tab.


#15

The program works correctly in Demo Runner. There was no need to visit audio device settings to get it working.