How to set default audio device for java apps on Linux?

I would like to find a way to choose a particular (ALSA) audio device for java applications. How can this be done without reprogramming the application or changing the default ALSA device? I came across "sound.properties", but could not find any information how to use this file on an ALSA system.
Thanks for any help, Mark

Eugenia wrote:Well, it's still not good enough.
We can't satisfy everyone. What you want is a corner case. For most people ALSA and dmix works appropriately, and that is what esd uses by default. We cannot document and automate every configuration possible. That's up to the users.
However, if you don't want to restart gnome, try the below... I make a few assumptions, but even if they're wrong, they're hardly difficult to work around.
Just copy the /etc/esd.conf to ~/.esd.conf, make your change, then do killall esd. Presumably gnome will restart esd, and it ought to read your local config. If it doesnt, start it yourself.
Feel free to write a script that automates this, or document it on the wiki.
I have to restart Gnome to get this thing working. Other OSes *automatically* can use an alternative device. But if I change ESD, I will have to restart Gnome, no?
Well, if you try my suggestion above, no. You can restart esd yourself. And that's what all the other distros do, except with some fancy GUI.
James

Similar Messages

  • How to change default audio device for gnome?

    My laptop has an integrated sound card, but I lately got a USB headset (headphones+mic, which works with linux btw, I tested it with GizmoProject which lets me choose which /dev/dspXX I want): http://www.geeks.com/details.asp?invtid=U200&cpc=SCH
    So, how do I change the default audio device for *all* desktop sounds to the headphones? I tried the two gnome sound properties, and when I select the headset device they let me configure it but ALSA still uses the internal audio card. Why isn't there a way to easily select which device you want for your sounds as there is for BeOS, Windows and OSX?

    Eugenia wrote:Well, it's still not good enough.
    We can't satisfy everyone. What you want is a corner case. For most people ALSA and dmix works appropriately, and that is what esd uses by default. We cannot document and automate every configuration possible. That's up to the users.
    However, if you don't want to restart gnome, try the below... I make a few assumptions, but even if they're wrong, they're hardly difficult to work around.
    Just copy the /etc/esd.conf to ~/.esd.conf, make your change, then do killall esd. Presumably gnome will restart esd, and it ought to read your local config. If it doesnt, start it yourself.
    Feel free to write a script that automates this, or document it on the wiki.
    I have to restart Gnome to get this thing working. Other OSes *automatically* can use an alternative device. But if I change ESD, I will have to restart Gnome, no?
    Well, if you try my suggestion above, no. You can restart esd yourself. And that's what all the other distros do, except with some fancy GUI.
    James

  • How to set default number format for whole app

    Hi!
    I have a bunch of View Objects and I have to set the format for each attribute of type number. I've tried using
    MyAtt_FMT_FORMAT=#,##0.00
    MaAtt_FMT_FORMATTER=oracle.jbo.format.DefaultNumberFormatter
    on just a couple of attributes and it works OK. But since I have a lot of number fields across application in a lots of view objects, I would like to set this format as default for all the number fields in my application.
    Can I do that and if yes, how?
    Thanks

    you can use Domains.
    chapter 26 Advanced Entity Object Techniques in Developer’s Guide For Forms/4GL Developers
    Regards,

  • Set default audio device?

    Prior to installing OSX Yosemite, the system audio output would be automatically switched to my USB audio device as soon as it was plugged in and detected by the OS.  In Yosemite, I have to manually switch the output from Internal Speakers to the USB device.
    Is there a way to force the setting to change on its own, as it did before? 

    Hello
    I do not want to hard wire the Ipod HIFI. I understand that if I used the line out feature the system would recognize the device. I would like the system to recognize a remote speaker connected by wireless network and to accept this remote speaker as the default audio device. Not likely but should be an option.
    Cheers
    Warrene
    iMac intel Core Duo   Mac OS X (10.4.6)   Airport Extreme and Express, iPod HIFI, iPods
    iMac intel Core Duo   Mac OS X (10.4.6)   Airport Extreme and Express, iPod HIFI, iPods

  • How to set default file type for Open dialog

    Dear my friends,
    I am using "At selection-screen ON VALUE-REQUEST FOR filepath" to display open dialog and i want to set default file type for open dialog = *.txt.
    Thank your times !

    Hello,
    U can make use of this code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR SP_FILE.
      PERFORM SAVE_DIALOG CHANGING SP_FILE G_F_RC.
    FORM SAVE_DIALOG CHANGING PO_FILE PO_RC.
      DATA: L_VA_BOXTITLE     TYPE STRING,
            L_VA_DEFAULTFILE  TYPE STRING,
            L_VA_DEFAULTNAME  TYPE STRING,
            L_VA_DEFAULTPATH  TYPE STRING,
            L_VA_DEFAULTFULL  TYPE STRING,
            L_VA_FILTERTEXT   TYPE STRING,
            L_VA_CODE         TYPE I.
      CLEAR: PO_RC, G_F_CONF.
      L_VA_BOXTITLE   = TEXT-B01.
      L_VA_FILTERTEXT = TEXT-B02.
      IF PO_FILE IS INITIAL.
        CLEAR L_VA_DEFAULTFILE.
      ELSE.
        L_VA_DEFAULTFILE = PO_FILE.
      ENDIF.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE            = L_VA_BOXTITLE
          DEFAULT_EXTENSION       = 'TXT'
          DEFAULT_FILE_NAME       = L_VA_DEFAULTFILE
          FILE_FILTER             = L_VA_FILTERTEXT
          INITIAL_DIRECTORY       = 'C:SAPWorkdir'
        CHANGING
          FILENAME                = L_VA_DEFAULTNAME
          PATH                    = L_VA_DEFAULTPATH
          FULLPATH                = L_VA_DEFAULTFULL
          USER_ACTION             = L_VA_CODE
        EXCEPTIONS
          CNTL_ERROR              = 1
          ERROR_NO_GUI            = 2
          OTHERS                  = 3.
      IF SY-SUBRC <> 0.
        PERFORM CHECK_ERRORTYPE(Z48M_MATDATA_UP) CHANGING SY-MSGTY.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        CLEAR PO_FILE.
        EXIT.
      ENDIF.
      IF L_VA_CODE NE 0.
        MESSAGE S818(3F) WITH TEXT-011.
        CLEAR: PO_FILE, PO_RC.
        EXIT.
      ELSE.
        WRITE L_VA_DEFAULTFULL TO PO_FILE.
        G_F_CONF = G_C_XFELD.
      ENDIF.
    ENDFORM.                    " save_dialog
    If useful reward.
    Vasanth

  • Can you use different audio devices for different apps?

    I've paired my iMac with a set of Bose Companion 20's - they connect via the headphone socket. I regard these as my default audio device. However, when I work from home I need to use Lync 2011 for Mac and want to be able to use a bluetooth headset for lync enterprise voice calls (my employers chosen platform). Is it possible to use my bluetooth headset for incoming / outgoing calls when using Lync but the Bose speakers for say internet radio? If this is possible, any guidance as how to configure would be much appreciated. Thanks in advance....

    After going to a particular folder and selecting a view, click the little Action Gear and select "Show View Options" and at the top check the box "Always open in xxx view" where xxx will be the view you presently have selected.
    Do not check the bottom box to use this as a default or else all folders will then open this way.
    Message was edited by: nerowolfe

  • [SOLVED]How to set default audio playback device?

    I have an X-fi forte soundcard that doesn't work on linux, so I'm just gonna use the onboard realtek chip, but I get no sound from that either unless I physically remove the X-fi card.
    I use the X-fi when I boot into windows though, so I'd like to keep it...
    How do I change the default playback device?
    I didn't find anything that worked in the wiki or with google.
    Last edited by raginaot (2010-12-05 04:30:21)

    oh wait... I just spotted this in the wiki guide, a little too late
    NB: Some modules do not support indexing options eg. snd-hda-intel. If you experience problems on reboot edit /etc/modprobe.d/modprobe.conf to just have the modules.
    what does that mean "edit /etc/modprobe.d/modprobe.conf to just have the modules.".... what modules? :S
    should I just remove "index=0" from the line?
    Edit: yes I should. It's working
    Thx man
    Last edited by raginaot (2010-12-05 04:29:52)

  • Set default audio track for playback in Source monitor

    So I'm an editor that is somewhat new to the profession and I am working on a project right now with close to 100 video clips in my project. Most of the clips have their audio recorded to track 2 but when I load the clips into the source window to find the footage asked for in my script there is no audio playback.
    They play fine in the program monitor once placed in a timeline, because I have all the audio tracks are turned on until I do my mastering at the end of the project. To get audio playback in the source monitor I have to change the view option to audio waveform which shows a blank screen because there is no audio on track. I then go to the drop-down menu just below the video display and select track 2 at which point the audio waveform shows up and plays back fine. This isn't too arduous a process and isn't a great burden but it slows my workflow down considerably as I have to repeat the process for each new clip I load into the source monitor.
    My question then is if there is anywhere in Premiere that I can set which audio track is the default audio playback track for clips loaded in the source monitor. I work on a lot of similar projects like this for the same client and they don't have the most rigorous standards for their shooters. This problem has come up before and will most assuredly arise again in the future so any tips/advice on how to fix this on my end would be much appreciated.
    Thanks!

    I'm not really sure.I don't do any shooting for the client and in fact don't have any contact with the shooters, we just do the post. They use a number of different freelance videographers all of whom have different equipment and procedures when it comes to formatting, orginization, etc.

  • Setting default volume level for Java Desktop

    Hello,
    I am running Sol 10 11/06 for sparc. How do I permanently set the default volume level for the Java desktop? If I change the volume manually and "save settings" on logoff, the saved setting is not saved after a reboot, after which I have to set it again.
    Thank you......

    Annoying, isn't it?
    Unfortunately the only thing you can do is lower your system volume before opening those pages. The volume could be controlled by the Web page author but most are clueless.

  • How to Set Default Printer Just for Safari

    I use 2 printers.
    One prints paper docs etc.  The other prints labels only.  When i want to print the labels I have to select that printer in the print dialogue in Safari every time.  Super annoying.
    IS there a way to set a gedault printer just for Safari?
    I tried using the localhost:641/admin method and all i get is Bad Request  (the localhost address i mention here is not the actual version as i cannot remember it now, but it was something like that)
    Using safari 6.0.2 and osx 10.8.2

    Please see these docs.
    How To Setup Default Printer for a User. [ID 153927.1]
    How to Set Up a Default Printer for a User Within Oracle Applications [ID 1018856.102]
    How To Define a Default Printer? [ID 1237254.1]
    How To Setup Default Printer For Applications [ID 184109.1]
    Thanks,
    Hussein

  • How to set default email address for contact with multiple addresses.

    Apologies if this has been asked before, it seems a very basic question but I'm unable to find an answer.
    Can a default address be set in Address Book for a contact with multiple addresses? Or if not, which address does it send to "automatically" when this condition exists? I know you can manually select the address you want to use, but what if the contact is added to a group?
    Thanks
    Denis

    Thanks for the reply, buy I have no idea what this means.
    I have the same question. I have a contact that has five email addresses. When I add the person to a group, Mail automatically selects one of the addresses, but not the one I want. I need to go back and manually select the correct address. Can't I select one of these addresses as the default to be used all the time?
    Apologies for not quite understanding the first reply.

  • How to set default file permissions for applicatio...

    I have the nokia n86 and was wondering if there was any way of setting the file permissions of a program via the phone. To put it in context, i downloaded a program that edits photos but everytime i try to load a picture from my phone it asks me (for every single folder in my phone, not just the photo ones) if the program can open it. I can be there clicking yes all day as i there is a lot of folders and subfolders on the phone. I know sony ericssons had an option where you could select the programs permissions to always ask or never ask but i cant seem to find a similar option on the nokia.
    Does anyone have any ideas?

    Same issue here. Everything I put on the drive is set to Read-only for the group.

  • How to set flex builder profiler for AIR apps ?

    Hi everybody !
    I am trying to profile my AIR app but I can't run the profiler....
    For flex app (in web browser) profiler works fine, for my AIR app, debug works but profiler just display 'socket timeout'.
    I also try to profile my air app as an external application profiler start but crash saying NativeWindow not found (like AIR sdk was not found...)
    SO How I can't set my AIR player or my profiler to work ???
    Thx all and happy christmas !

    Hello,
    I would be glad if someone show me how to accomplish those. I am new to Java so I am not sure how to do those.
    Best Regards.
    1. create a batch file to launch your 'desktop' app - the batch file should set the proper environment (JAVA_HOME,, path, etc)
    2. create a small wrapper application that is launched by Java web start.
    3. the wrapper app will do nothing more use ProcessBuilder to execute the batch file you created which will then launch the app
    That way Java web start can use 1.7 to launch the wrapper app but the batch file will set the environment to 1.5 for the other app.

  • [SOLVED] Setting default audio device pulseaudio

    Now i finally get almost all sounds working, but i need to select somehow default output sound device, because i can't change it manually with 'pavucontrol'. When i run Windows applications with Wine i don't get sounds either and 'pavucontrol' is not giving any output of Windows game. Is these problem solved with changing default device if yes, how do i do it?
    Using Logitech G930 sound card.
    lsof /dev/snd/* output:
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    knotify4 3078 arska134 mem CHR 116,3 1568 /dev/snd/pcmC0D0p
    knotify4 3078 arska134 20u CHR 116,33 0t0 3463 /dev/snd/timer
    knotify4 3078 arska134 21r CHR 116,3 0t0 1568 /dev/snd/pcmC0D0p
    pulseaudi 3218 arska134 mem CHR 116,7 6421 /dev/snd/pcmC1D0p
    pulseaudi 3218 arska134 mem CHR 116,8 6422 /dev/snd/pcmC1D0c
    pulseaudi 3218 arska134 20u CHR 116,9 0t0 6423 /dev/snd/controlC1
    pulseaudi 3218 arska134 26u CHR 116,9 0t0 6423 /dev/snd/controlC1
    pulseaudi 3218 arska134 27u CHR 116,8 0t0 6422 /dev/snd/pcmC1D0c
    pulseaudi 3218 arska134 34u CHR 116,7 0t0 6421 /dev/snd/pcmC1D0p
    pacmd list-sinks output:
    Welcome to PulseAudio! Use "help" for usage information.
    >>> 1 sink(s) available.
    * index: 0
    name: <alsa_output.usb-Logitech_Logitech_G930_Headset-00-Headset.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
    state: RUNNING
    suspend cause:
    priority: 9049
    volume: 0: 35% 1: 35%
    0: -27.42 dB 1: -27.42 dB
    balance 0.00
    base volume: 100%
    0.00 dB
    volume steps: 65537
    muted: no
    current latency: 30.13 ms
    max request: 3 KiB
    max rewind: 344 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
    Stereo
    used by: 1
    linked by: 1
    configured latency: 20.00 ms; range is 0.50 .. 2000.00 ms
    card: 0 <alsa_card.usb-Logitech_Logitech_G930_Headset-00-Headset>
    module: 4
    properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "USB Audio"
    alsa.id = "USB Audio"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "1"
    alsa.card_name = "Logitech G930 Headset"
    alsa.long_card_name = "Logitech Logitech G930 Headset at usb-0000:00:13.1-2, full speed"
    alsa.driver_name = "snd_usb_audio"
    device.bus_path = "pci-0000:00:13.1-usb-0:2:1.0"
    sysfs.path = "/devices/pci0000:00/0000:00:13.1/usb6/6-2/6-2:1.0/sound/card1"
    udev.id = "usb-Logitech_Logitech_G930_Headset-00-Headset"
    device.bus = "usb"
    device.vendor.id = "046d"
    device.vendor.name = "Logitech, Inc."
    device.product.id = "0a1f"
    device.product.name = "Logitech G930 Headset"
    device.serial = "Logitech_Logitech_G930_Headset"
    device.form_factor = "headset"
    device.string = "front:1"
    device.buffering.buffer_size = "352800"
    device.buffering.fragment_size = "176400"
    device.access_mode = "mmap+timer"
    device.profile.name = "analog-stereo"
    device.profile.description = "Analog Stereo"
    device.description = "Logitech G930 Headset Analog Stereo"
    alsa.mixer_name = "USB Mixer"
    alsa.components = "USB046d:0a1f"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-headset-usb"
    device.intended_roles = "phone"
    Solution:
    gulafaran wrote:get the wine-pulse package from AUR and add "mmdevapi" to winecfg libraries and set it to disabled and set Audio to Pulseaudio
    Last edited by Arska134 (2011-05-15 16:52:53)

    and here is some console log when i tried to play Enemy-territory. Sounds not working.
    http://paste.servut.us/plain/uyit
    I found this:
    ------- sound initialization -------
    SDL audio driver initializing...
    SDL_AudioDriverName() = NULL
    Why NULL?
    Edit:
    Sounds not working currently: System sounds, Enemy-territory, Call of duty 4 (with wine)
    but works in Wings 2. O_o
    Edit 2:
    litemotiv wrote:Arska14, please update your topic title so that it reflects that it's a pulseaudio / wine question.
    i removed Wine from topic title because it's not affecting wine only.
    Last edited by Arska134 (2011-05-15 11:52:25)

  • How to set my own icon for java frame ??

    I create a java class it extends JFrame. I want to change default icon on the left_top corner and using my own icon. It is a --.gif file. How to do it. When I try to modify it using setIconImage( Image image), I met problem. I cann't new Image("--.gif"). I don't know how to create a Image object using a string(file name). I try to use ImageIcon , but it is not image obj. Thanks. Gary

    According to the documentation setIconImage does the following: Sets the image to be displayed in the minimized icon for this frame. Not all platforms support the concept of minimizing a window.
    So,
    1) It does not change the icon in the top-left corner
    2) It does not work on all platforms.

Maybe you are looking for

  • How to setup live mail, how to setup live mail

    how to setup live and hotmail.com

  • How to set the location of a button  (in an applet)

    Hello How do i set the location of the button forexample if i want to create a button in the middle of the applet, how would i do that Thanks :)

  • Ordered Qty

    Hi Experts, My purchasing team place an order for 1000 qty, we did the advance payment using reserve a/p invoice. on the po it is open qty = 700 and qty = 1000 on the item master the stock data is : instock = 0 committed = 0 ordered=700 available = 7

  • GR qty to match TO qty

    Hello, Please find below process PO - Inbound delivery - HU - TO - GR Inbound delivery qty - 10 Hu1 - 7 nos Hu2 - 3 nos TO is created for for 7 and 3 nos but now when i confirm TO's GR is created for 10 nos But my requirement is to create two GR with

  • WHAT IS DATA PACKET SIZING IN BW?

    Hi Gurus, WHAT IS DATA PACKET SIZING IN BW? is it modeling, extraction or reproting related topic? Regards,RAMU.