Wikipedia:Reference desk/Archives/Computing/2017 September 27

= September 27 =

Why do audio CD .WAV files show up in Ubuntu but not in Windows?
Thanks very much for all your help. --178.170.142.117 (talk) 21:53, 29 September 2017 (UTC)

I have a laptop that came with Windows 8.1 preinstalled on it and several music CDs; when I insert a CD, it shows up in Windows Explorer, but the only files that show up as being on the disk are the .cda files for each track. However, after I installed Ubuntu 16.10 on my laptop alongside Windows, I noticed that when I inserted one of the same audio CDs, it showed up in Ubuntu's file manager as containing the full WAV files for each track.

In summary:
 * Windows: CDA stub files appear
 * Ubuntu: full WAV files appear

Why is this? Whoop whoop pull up Bitching Betty &#124; Averted crashes 00:53, 27 September 2017 (UTC)


 * I would guess security through obscurity. Perhaps an attempt by Microsoft (back in the day) to make pirating CDs more difficult? 196.213.35.146 (talk) 06:25, 27 September 2017 (UTC)
 * Audio CDs have no file system, it's just a big chunk of data with numeric indices so it's up to the OS how to display the tracks. Windows displays them as tiny files that identify the track to the CD playing program which then does reading the actual audio data (aka "ripping.") Linux displays them as WAV files because it's easy to convert audio data to WAV on the fly, plus user programs only have to implement one set of semantics (open a file on a data CD/extract tracks from an audio CD are normally very different operations.) If it wasn't so computationally intensive, it could display them as MP3 or FLAC, too. The point is the files do not exist on the CD as such. 78.53.241.14 (talk) 10:47, 27 September 2017 (UTC)


 * Simple answer: Install Foobar2000 and VLC media player on every Windows machine and let those programs handle all audio and video playback. Those two programs are free, and are light years ahead of competing media payers, including anything from Microsoft. Do that and you will pretty much never have a problem playing audio or video on your Windows machine. --Guy Macon (talk) 12:14, 27 September 2017 (UTC)
 * I already have VLC installed on the Windows side of my laptop (great minds think alike, it seems! :-P), having installed it well before I installed Ubuntu alongside Windows; I was just curious as to the reason for the discrepancy between what was shown by the two different file managers.  Thanx for the suggestion, though!  :-) Whoop whoop pull up Bitching Betty &#124; Averted crashes 13:54, 27 September 2017 (UTC)
 * Frankly I find VLC's handling of subtitles, the interface and controls and a lot of other stuff with it crap. (For example while there is a famous extension, AFAIK it still lacks any support for internal subtitle downloading without it.) It also lacks support for MadVR, or for that matter SVP or anything that similar. And frankly they took way too long to get DxVA working. I do normally install it just in case there's anything that I need it for but frankly most stuff just plays fine on MPC-HC and it's actually been a very long time since I've really needed VLC for compatibility and no I do not install codec packs or other shit like that. (Probably MadVR although I'm mostly watching 1080P content on a 1080P TV nowadays so haven't needed it for a while, maybe SVP (but unlike with MadVR I've never been convinced I'm noticing a difference so don't really bother that much). And I'm definitely far from the only one to feel this way. PotPlayer is also popular, although I didn't really find anything to rave about when I tried it (which was quite a long time ago now). Still to each their own. For streaming, I'm pretty sure VLC is better but I don't use that. Note if any of the default Windows players have problems playing audio CDs, probably since XP there's probably some serious issue there you should fix rather than just papering over the cracks. As 78 said, audio CDs don't have a file system as such but no serious media player nor Windows installation should have problems playing them. Incidentally, if you're using a laptop on battery, you may want to compare how your player is doing on battery life/power usage. Presuming there isn't a reason for it, e.g. MadVR, and you've enabled hardware acceleration etc, I'd personally choose the player with the significantly better battery life even if it is MS which may very well be the case. Microsoft's support for subtitles is even worse than VLC, still you can probably find a solution for that which doesn't significatly affect battery life nor require much effort. Nil Einne (talk) 14:14, 28 September 2017 (UTC)


 * Do any Ubuntu power-users know which program or piece of system-software is actually doing this work of decoding the CD audio and displaying it as a normal WAV file? Is it nautilus, or lower-level software like GVfs or GIO (here's the developer documentation); or is it some cryptic semi-proprietary solution provided by Canonical or its vendor?  Or is some other GNU application software that is cosmetically but seamlessly blended into the main Unity user-interface?
 * As far as I can tell, it looks like  gvfsd-cdda can perform this CD-audio-to-virtual-file-system, abstraction; and Ubuntu has a man-page for it; but is this GNU software the real work-horse that Ubuntu is actually using?
 * Nimur (talk) 15:29, 27 September 2017 (UTC)
 * I think that is what's doing it: the file names look like /run/user/#/gvfs/cdda:host=sr0/Track 1.wav, with the magic gvfs directory having the filesystem type "fuse.gvfsd-fuse". --Tardis (talk) 21:35, 29 September 2017 (UTC)

Java programming help.
tokenizer = new Scanner(output);

Now "output" could be stuff like "5" or "5 5" or "5    5" or "5 + 5" or "5 5 +" or "5 5+"

Point is, they are all separated by spaces. How do I make an if statement that will

-check if there is no integer in the output? -check if there are no + - * or / in the output?

Thanks. 12.239.13.143 (talk) 19:37, 27 September 2017 (UTC).

Edit: 2nd question, how do you return the size, of a stack? 12.239.13.143 (talk) 20:22, 27 September 2017 (UTC).


 * You'll want to split the data like this example: http://crunchify.com/java-stringtokenizer-and-string-split-example/. From there, you can use the Java versions of isInteger and instr on each token. As for stack size, if you're referring to the stack used by the JVM, you can adjust it like this: http://www.onkarjoshi.com/blog/209/using-xss-to-adjust-java-default-thread-stack-size-to-save-memory-and-prevent-stackoverflowerror/. OldTimeNESter (talk) 20:32, 27 September 2017 (UTC)

If one radio station is louder than another, is there a way to measure the volume?
This station is considerably louder than this one even though my computer says the volume is set at 31. Is there some method for determining how much louder one is than the other, so I'll know where to set each one so they will be equal if I want to listen to one rather than the other? I have Windows 10 and Microsoft Edge.— Vchimpanzee  •  talk  •  contributions  •  20:11, 27 September 2017 (UTC)


 * Oh. Before Microsoft came on the seen to disrupt everything we could rely on our Automatic gain control. Ask Microsoft. Aspro (talk) 20:19, 27 September 2017 (UTC)


 * Waiting on Microsoft.— Vchimpanzee  •  talk  •  contributions  •  20:37, 27 September 2017 (UTC)


 * I got an answer relating to a Volume Mixer but it sounds complicated.— Vchimpanzee  •  talk  •  contributions  •  18:49, 28 September 2017 (UTC)


 * Here's another question. Is there anything comparable to a screen shot that I can use to copy the sound, so I can send it to someone to compare the volume from the two stations?— Vchimpanzee  •  talk  •  contributions  •  18:06, 2 October 2017 (UTC)