Menu

#65 ALSA config char* is ugly and cumbersome

closed
nobody
2015-04-04
2015-03-17
Anonymous
No

Originally created by: bill-auger
Originally owned by: bill-auger

NOTE: this is mainly a libninjam issue

the function create_audioStreamer_ALSA() prototype as declared in audiostream.h requires a char config_string - this is intended to be passed in verbatim via command line args to the curses client so runtime configuration was not considered - gNinjam implemented runtime configuration simply as a single textbox - this is obviously not the best implementation one could imagine - also JUCE is not keen on exposing its innerds like that and its String methods only produce const char

possible remedies:
* modify the existing initializer in linbninjam to require a const char* // <-- current dev solution
* override initializer in linbninjam to accept separate args like its cousins // <-- better solution

Related

Tickets: #12

Discussion

  • Anonymous

    Anonymous - 2015-03-17

    Originally posted by: bill-auger

    NJClient accepts the following config_strings (original cli params)

        win =>
          -noaudiocfg
          -jesusonic <path to jesusonic root dir>
        mac =>
          -audiostr device_name[,output_device_name]
        nix =>
          -audiostr "option value [option value ...]"
            ALSA audio options are:
              in hw:0,0    -- set input device
              out hw:0,0   -- set output device
              srate 48000  -- set samplerate
              nch 2        -- set channels
              bps 16       -- set bits/sample
              bsize 1024   -- set blocksize (bytes)
              nblock 16    -- set number of blocks
    

    the values for ALSA above are the actual defaults

     
  • Anonymous

    Anonymous - 2015-03-20

    Originally posted by: bill-auger

    done 7a5ff18

    using tentative overridden create_audioStreamer_ALSA()

    audioStreamer *create_audioStreamer_ALSA(SPLPROC     on_samples_proc          ,
                                             std::string input_device  = "hw:0,0" ,
                                             std::string output_device = "hw:0,0" ,
                                             int         n_channels    = 2        ,
                                             int         sample_rate   = 44100    ,
                                             int         bit_depth     = 16       ,
                                             int         n_buffers     = 16       ,
                                             int         buffer_size   = 1024     ) ;
    
     
  • Anonymous

    Anonymous - 2015-03-20

    Ticket changed by: bill-auger

    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.