adw888's Profile User Rating: -----

Reputation: 7 Worker
Group:
Members
Active Posts:
24 (0.01 per day)
Joined:
10-July 08
Profile Views:
1,232
Last Active:
User is offline Oct 06 2012 04:07 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Classic
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   adw888 has not set their status

Posts I've Made

  1. In Topic: [Resolved] Incorrect Playback of 24 bit Audio

    Posted 6 Oct 2012

    Just a quick message to say it also works on Mac, so it's only Windows where there's a problem.
  2. In Topic: Etiquette for Bumping Threads

    Posted 27 Sep 2012

    View Postmacosxnerd101, on 10 September 2012 - 06:47 PM, said:

    I did take a look at your thread, by the way, and it looks like a third party library. Sometimes when you use third party tools, we have mixed levels of support for them based on our members' familiarities.

    Thank you. :) It was an OS-specific (Windows) issue in the end.

    On a related topic - is it not possible to mark topics as [Resolved] any more?
  3. In Topic: [Resolved] Incorrect Playback of 24 bit Audio

    Posted 27 Sep 2012

    I've finally solved this (well kind of) - it works fine in Linux, so it's a Windows Java Sound / Microsoft DirectSound issue. :)

    Details follow (copied from my post on the Oracle Java Sound subforum):
    ---
    The following outlines the testing and results using Java Sound with the same PC and sound card(s) using Linux, Windows XP and Windows 7 (all 64 bit).

    The set up is similar to before, with the test player PC connected directly (via S/PDIF out) to a recorder PC (with a Lynx soundcard). The player PC uses a ESI Juli@ soundcard (as it has Linux ALSA support).

    With Linux (Fedora 17 to be precise), 16 bit and 24 bit audio plays perfectly using Java Sound with the default ALSA driver for the ESI soundcard. In fact, it even works perfectly using the onboard Realtek sound chip via its (RCA) S/PDIF out.

    With Windows XP, the same results are seen as before: 16 bit audio plays perfectly using Java Sound but 24 bit audio is processed in some way.

    With Windows 7, it's even worse: 16 bit audio plays (but some kind of processing is done) and 24 bit audio refuses to play at all.

    This prompted me to check the supported audio formats for a given device line in Java using:
    DataLine.Info dataLineInfo = (DataLine.Info) lineInfo;
    

    and then looping through:
    for (AudioFormat lineFormat : dataLineInfo.getFormats())
    

    I didn't do this before as I didn't realise that casting to DataLine.Info exposed more information.

    In Windows 7 the supported audio formats are reported as:
    ---
    Format #1: PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #2: PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #3: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    Format #4: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    Format #5: PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    Format #6: PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    Format #7: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    Format #8: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    ---
    And it's the same list for both the ESI and Realtek devices, so this seems to be due to the Windows Java Sound implementation and/or DirectSound.
    It also explains why 24 bit refuses to play, because it is not a supported format.

    In Windows XP the supported audio formats are reported as (again the same for both devices):
    ---
    Format #1: PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #2: PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #3: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    Format #4: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    Format #5: PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    Format #6: PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    Format #7: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    Format #8: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    ---
    So the reported formats are the same as for Windows 7, but the difference is that Java Sound will let you play 24 bit audio data even though it isn't on the list of supported audio formats.
    My guess is that Windows Java Sound / DirectSound doesn't actually support 24 bit, but accepts that format and presumably converts down to 16 bit, which the soundcard then processes to 24 bit, hence the incorrect data output.

    In Linux (Fedora 17), the supported audio formats are reported as:
    ---
    Format #1: PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, little-endian
    Format #2: PCM_SIGNED unknown sample rate, 32 bit, mono, 4 bytes/frame, big-endian
    Format #3: PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, little-endian
    Format #4: PCM_SIGNED unknown sample rate, 32 bit, stereo, 8 bytes/frame, big-endian
    Format #5: PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, little-endian
    Format #6: PCM_SIGNED unknown sample rate, 24 bit, mono, 4 bytes/frame, big-endian
    Format #7: PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, little-endian
    Format #8: PCM_SIGNED unknown sample rate, 24 bit, stereo, 8 bytes/frame, big-endian
    Format #9: PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, little-endian
    Format #10: PCM_SIGNED unknown sample rate, 24 bit, mono, 3 bytes/frame, big-endian
    Format #11: PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, little-endian
    Format #12: PCM_SIGNED unknown sample rate, 24 bit, stereo, 6 bytes/frame, big-endian
    Format #13: PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, little-endian
    Format #14: PCM_SIGNED unknown sample rate, 20 bit, mono, 3 bytes/frame, big-endian
    Format #15: PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, little-endian
    Format #16: PCM_SIGNED unknown sample rate, 20 bit, stereo, 6 bytes/frame, big-endian
    Format #17: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
    Format #18: PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
    Format #19: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
    Format #20: PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
    Format #21: PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #22: PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
    Format #23: PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    Format #24: PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
    ---
    Again with the same list for both devices, but reported in a different order.

    So Linux Java Sound / ALSA properly supports 24 bit audio, which explains why it handles it perfectly whereas Windows does not.

    Seeing as the supported audio formats appear to be the same regardless of soundcard and that both soundcards work perfectly using Linux, the lack of 24 bit playback seems to be a limitation of DirectSound and/or the Windows Java Sound implementation rather than device drivers or Java Sound more generally.

    Hope this is helpful - I'm marking it as answered even though it isn't fully solved (doesn't work in Windows, works fine in Linux). :)
    ---
  4. In Topic: Etiquette for Bumping Threads

    Posted 10 Sep 2012

    I meant on here (Dream.In.Code) specifically, and thanks for the replies - that all makes sense. :)
  5. In Topic: VB6 Roll Call

    Posted 7 Sep 2012

    I coded in VB6 (and VB4 and VB5) for around 12 years from 1996 to 2008. I've now switched to Java for the cross-platform support and because I didn't like VB.NET. If Microsoft had released a real VB7 with full OOP implementation and general updates and bugfixes I might have switched to that.

    All of the software I've written has been for friends or family but it seems I did upload one small VB application to SourceForge: OpenAccent - looks like last update was in 2004 so I have no idea if it still works. :P

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
15
Programming Languages:
Visual Basic, Delphi, C++, ASM, PHP, Java

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Friends

adw888 hasn't added any friends yet.

Comments

adw888 has no profile comments yet. Why not say hello?