Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading Winamps with output configured
#1
A little background:
I am developing for a radio station where they will be streaming 6am-6pm radio over the internet. We have configured the automation system (NexGen) to flag and not play audio we do not have rights to stream. This creates gaps in audio where we are filling using Winamp. I have developed an audio detection program that monitors audio on the line input of the PC. When silence exceeds a specified length the program sends WM_COMMAND to play files from a directory. When audio comes back more commands are sent to fade out and stop. Winamp needs to be configured to use the soundcard as an output

I am using another Winamp instance to output archived mp3 files of the internet stream. To schedule the files to record a specified length and time, I am using LineIn plugin v1.80 where a playlist is generated and loaded at startup based on some time and date variables. These files will stream from 6pm-6am. Here the Winamp output needs to be configured to use disk writer as an output.

To load both the Winamps I am using a command line in the program so I can rename the window classes allowing the management of multiple instances. The program executable is in the Start-up folder and loads everything

The problem:
If the computer goes down at anytime who ever is in the studio will need to be able to just boot and not configure anything. I doubt the system will even have a monitor. So I need a way to load a Winamp with the output configured correctly for each instance of Winamp...preferably from the command line. Figure could use the Winamp.ini file or something like that.

This is the last step in developing the whole program and then I will be done...so I am a little impatient. I just can't seem to get anything to work just yet.

Here is an example loading Winamp:
run "$program files$\Winamp\winamp.exe" "/CLASS=''Internet_Fill'' /NEW ''C:\Program Files\Internet Fill.m3u''"

Thanks,
Jimmy Vig
#2
Links that I have found on the Winamp site:
http://forums.winamp.com/showthread.php?threadid=180297
http://forums.winamp.com/showthread.php?...0297#multi
http://forums.winamp.com/showthread.php?...did=182606
#3
I got this figured out. When you call for new inidir that does not exist it creates an empty one. That's why it runs through the initial set-up again. I just wasn't taking it far enough by running winamp a second time using the same ini. Works like a champ now.

Actually it's all very cool! Once I open the winamp with the specified ini, what ever that winamp is set up up to is the way it opens every time. Size, position, skin, output, input...it is more than I could have ever hoped for.
#4
Hey Vig,
Just for future reference, can you give an example of your fully formed "run" line that calls specific .ini files?
Any other useful bits that you think important would also be appreciated...
Thanks!
Steve
#5
Macro
Code:
Copy      Help
run "Winamp" "/INIDIR=''C:\program files\Winamp\Winamp1'' /CLASS=''Winamp1''"

;;On first run the winamp initial configuration will run
;;
;;during this configurations WinAmp will create this directory:
;;"$program files$\Winamp\Winamp1\Winamp.ini"

;;it's best to let WinAmp write this directory because it creates
;;some other files along with.

;;However you leave WinAmp on close will be updated in the Winamp.ini file
;;This will be the way WinAmp will open the next time
Macro
Code:
Copy      Help
;;If you want to make sure WinAmp opens the same way evertime
;;Run a setfile to "$program files$\Winamp\Winamp1\Winamp.ini"
;;before the run command.

;;This example will run winamp with classic skin
;;no eq window, no playlist window, shuffle on, and repeat on.
;;go to http://forums.winamp.com/showthread.php?s=&threadid=182606
;;for a list of the defintions in the ini file.
str s=
;;[Winamp]
;;utf8=1
;;skin=
;;config_extlist=
;;newverchk2=0
;;newverchk=11034
;;newverchk3=0
;;prefs_last_page=0
;;autoload_eq=0
;;playlist_recyclebin=1
;;use_eq=0
;;eq_ws=0
;;wx=0
;;wy=0
;;minimized=0
;;aot=0
;;shuffle=1
;;repeat=1
;;volume=200
;;pan=0
;;easymove=1
;;dsize=0
;;timeleftmode=0
;;autoscrollname=1
;;sa=1
;;safire=4
;;saref=2
;;safalloff=2
;;sa_peaks=1
;;sa_peak_falloff=1
;;eq_wx=0
;;eq_wy=116
;;eq_open=0
;;mw_open=1
;;pe_wx=26
;;pe_wy=261
;;pe_open=0
;;pe_width=275
;;pe_height=116
;;pe_height_ws=0
;;eq_limiter=1
;;eq_type=0
;;eq_frequencies=0
;;video_wx=0
;;video_wy=116
;;video_open=0
;;video_width=275
;;video_height=232
;;video_ratio1=4
;;video_ratio2=3
;;video_useratio=0
;;windowshade=0
;;preamp=31
;;pilp=0
;;randskin=0
;;cwd=
;;outname=out_ds.dll
;;pladv=1
;;eq_data=31,31,31,31,31,31,31,31,31,31
;;video_vsync=0
;;video_aspectadj=1
;;video_overlays=1
;;video_gdiplus=0
;;video_ddraw=1
;;video_updsize=1
;;video_autoopen=1
;;video_autoclose=1
;;video_noss=1
;;video_osd=1
;;video_yv12=1
;;video_stopclose=1
;;video_auto_fs=0
;;playback_thread_priority=2
;;audio_bits=16
;;audio_mono=0
;;audio_surround=1
;;audio_dither=1
;;replaygain=0
;;replaygain_mode=1
;;replaygain_source=0
;;replaygain_preferred_only=0
;;replaygain_non_rg_gain=-6000
;;replaygain_preamp=0
;;video_remove_fs_on_stop=1
;;wav_do_header=1
;;wav_convert=0
;;wav_ext=WAV
;;playlist_custom_font=Arial
;;custom_plfont=1
;;no_registry=0
;;last_classic_skin_page=0
;;last_playback_page=0
;;zeropadplnum=0
;;accessibility_modalbeep=0
;;accessibility_modalflash=1
;;[WinampReg]
;;WAVer=5.541
;;NeedReg=0
;;ID=AD330151CB08624A86E87FEF11B3E5CB
;;Stats=00000006,00000026,00000026,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,
;;[out_ds]
;;cfg_buf_ms=2000
;;cfg_prebuf2=500
;;cfg_sil_db=400
;;cfg_trackhack=500
;;cfg_oldpause=0
;;cfg_killsil=0
;;cfg_wait=1
;;cfg_createprimary=0
;;cfg_volume=1
;;cfg_fadevol=1
;;cfg_autocpu=0
;;cfg_volmode=0
;;cfg_logvol_min=100
;;cfg_logfades=0
;;cfg_hw_mix=1
;;cfg_override=0
;;cfg_override_freq=44100
;;cfg_override_bps=16
;;cfg_override_nch=2
;;cfg_refresh=10
;;cfg_dev2=0000000000000000000000000000000000
;;cfg_def_fade=333
;;cfg_status_update_freq=50
;;cfg_total_time=000000000000000000
;;cfg_fade_start.time=333
;;cfg_fade_start.on=0
;;cfg_fade_start.usedef=1
;;cfg_fade_firststart.time=333
;;cfg_fade_firststart.on=0
;;cfg_fade_firststart.usedef=1
;;cfg_fade_stop.time=333
;;cfg_fade_stop.on=0
;;cfg_fade_stop.usedef=1
;;cfg_fade_pause.time=333
;;cfg_fade_pause.on=1
;;cfg_fade_pause.usedef=1
;;cfg_fade_seek.time=333
;;cfg_fade_seek.on=1
;;cfg_fade_seek.usedef=1
;;[out_wave]
;;cfg_buf_ms=2000
;;cfg_dev=0
;;cfg_volume=1
;;cfg_altvol=0
;;cfg_resetvol=0
;;cfg_prebuf=200
;;cfg_trackhack=200
;;[in_wm]
;;numtypes=6
;;type0=WMA
;;description0=Windows Media Audio File (*.WMA)
;;protocol0=0
;;avtype0=0
;;type1=WMV
;;description1=Windows Media Video File (*.WMV)
;;protocol1=0
;;avtype1=1
;;type2=ASF
;;description2=Advanced Streaming Format (*.ASF)
;;protocol2=0
;;avtype2=1
;;type3=MMS://
;;description3=Windows Media Stream
;;protocol3=1
;;avtype3=1
;;type4=MMSU://
;;description4=Windows Media Stream
;;protocol4=1
;;avtype4=1
;;type5=MMST://
;;description5=Windows Media Stream
;;protocol5=1
;;avtype5=1
;;config_lowmemory=1
;;config_clock=1
;;config_video_dedicated_thread=1
;;config_video_early=0
;;config_video_early_pad=500
;;config_video_outoforder=1
;;config_video_catchup=1
;;config_video_jitter=5
;;config_video_drop_threshold=15
;;config_video_cache_frames=16
;;config_video_notifylate=1
;;config_video_framedropoffset=0
;;config_video_flip=0
;;config_audio_outoforder=0
;;config_audio_dedicated_thread=1
;;config_audio_early_pad=0
;;config_audio_early=0
;;config_audio_cache_frames=12
;;config_audio_num_channels=6
;;config_no_silent=0
;;config_untrusted_ok=0
;;config_http_metadata=0
;;config_buffer_time=5000
;;config_extra_asx_extensions=0
;;[in_vorbis]
;;version=66052
;;[Nullsoft Module Decoder]
;;savestr=0
;;priority=20
;;nch=2
;;srate=44100
;;interp=3
;;voices=96
;;loopcount=0
;;playflag=0
;;resonance=1
;;fadeout=1000
;;pansep=128
;;panrev=0
;;info_x=0
;;info_y=0
;;track=0
;;tsel=0
;;modenabled=1
;;modpanning=0
;;modeffects=0
;;m15enabled=1
;;m15panning=0
;;m15effects=0
;;stmenabled=1
;;stmpanning=0
;;stmeffects=0
;;st3enabled=1
;;st3panning=32
;;st3effects=0
;;itenabled=1
;;itpanning=0
;;iteffects=0
;;ft2enabled=1
;;ft2panning=0
;;ft2effects=0
;;mtmenabled=1
;;mtmpanning=0
;;mtmeffects=0
;;ultenabled=1
;;ultpanning=0
;;ulteffects=0
;;669enabled=1
;;669panning=0
;;669effects=0
;;farenabled=1
;;farpanning=0
;;fareffects=0
;;amfenabled=1
;;amfpanning=0
;;amfeffects=0
;;oktenabled=1
;;oktpanning=0
;;okteffects=0
;;ptmenabled=1
;;ptmpanning=0
;;ptmeffects=0
;;[in_midi]
;;sysex_table=4D485030000000000000000015
;;dls_file=
;;extra_exts=
;;[Jump To File Extra]
;;skfr_x=0
;;skfr_y=0
;;skfr_width=400
;;skfr_height=377
;;skfr_show=0
;;wa_cur_page=0
;;jumpex_on=1
;;force_shuffle_off=1
;;jumpex_dlg_def=1094
;;jumpex_enq_but=1
;;jumpex_mac_list=0
;;jumpex_skin=0
;;jump_form_str=%S  -  [%N%M]
;;jump_form_plstr=[%N]%t
;;jumpex_text=1
;;jumpex_page=0
;;jumpex_pos=0
;;jumpex_pos_x=0
;;jumpex_pos_y=0
;;jumpex_multi_ind=^
;;jumpex_aot=0
;;jumpex_time=0
;;jumpex_playlist=1
;;jumpex_autoload=0
;;jumpex_search_on=0
;;jumpex_search=
;;jumpex_restore=1
;;jumpex_res_pos=-1
;;jumpex_playdisplay=1
;;jumpex_playwa3=1
;;jumpex_plsubmenu=1
;;jumpex_menutop=0
;;jumpex_but_one=4919
;;jumpex_but_two=4920
;;jumpex_but_thr=4918
;;jumpex_but_for=2
;;jumpex_but_one_pos=0
;;jumpex_but_two_pos=1
;;jumpex_but_the_pos=2
;;jumpex_but_for_pos=3
;;jumpex_but_one_on=1
;;jumpex_but_two_on=1
;;jumpex_but_thr_on=1
;;jumpex_but_for_on=1
;;jumpex_plm1=0
;;jumpex_plm2=3
;;jumpex_plm3=4
;;jumpex_plm4=5
;;jumpex_plm5=6
;;jumpex_plm6=7
;;jumpex_plm7=8
;;jumpex_plm8=9
;;jumpex_plm9=10
;;jumpex_plm10=1
;;jumpex_plm11=2
;;ecm_sel1=1
;;ecm_sel2=1
;;ecm_sel3=1
;;ecm_sel6=1
;;ecm_sel7=1
;;ecm_sel8=1
;;jumpex_pl_list=
;;jumpex_restore_pl=0
;;jumpex_enter=0
;;jumpex_dblclk=0
;;jumpex_onenter=1094
;;jumpex_ondblclk=1000
;;jumpex_flipmode=0
;;jumpex_onqend=-1
;;jumpex_q_hilite=1
;;jumpex_resetpl=0
;;jtfe_autoupdate=0
;;jtfe_lastcheck=0
;;jumpex_bckcol=-1
;;jtfe_time_text=-1
;;jtfe_span_col_col=-1
;;jtfe_span_text=-1
;;jtfe_span=1
;;jtfe_span_col=1
;;jtfe_span_text_col=0
;;jtfe_text_col=0
;;jtfe_plblend=0
;;jumpex_thistime=0
;;jtfe_no_winamp_scroll=0
;;jtfe_mclick=0
;;jtfe_shell_enq_play=0
;;jtfe_shell_add_queue=0
;;jtfe_shell_add_after=0
;;jtfe_shell_always=0
;;jtfe_shell_queue_type=0
;;jtfe_shell_default=0
;;jtfe_anders=0
;;jtfe_ml_enhance=0
;;jtfe_ml_sendto=1
;;jtfe_ml_sendto_ep=1
;;jtfe_ml_sendto_q_mode=1
;;jtfe_ml_favs=0
;;jtfe_nview=0
;;jtfe_toggle_wnd=0
;;jtfe_nosort=0
;;jtfe_flash_show=1
;;jtfe_flash_show_inv=0
;;jumpex_selcount=5
;;jtfe_pleditfont=1
;;jtfe_rclk_mlquery=0
;;jtfe_winshadeapi=1
;;jtfe_queue2ml=0
;;jtfe_search2ml=0
;;jtfe_view_mem=1
;;jtfe_show_num=0
;;jtfe_refresher=1
;;jtfe_resonqend=0
;;jumpex_lang=english
;;timer_on=0
;;timer_len=10
;;span=1
;;span_col=1
;;span_text_col=0
;;text_col=0
;;plblend=1
;;q_hilite=0
;;CustomExpand=1
;;excludeslash=0
;;time_text=-1
;;span_col_col=-1
;;span_text=-1
;;bckcol=-1
;;jtfe_restore_view=0
;;jtfe_search_limit=0
;;jtfe_search_lim_num=100
;;jtfe_fltstr=
;;jtfe_search_delay=250
;;[Nullsoft Tray Control]
;;BEN=0
;;ico_pack=
;;ico_pack_safe=
;;custom=0
;;on=1
;;[ml_rg]
;;config_ask=1
;;config_ask_each_album=1
;;[pmp_usb]
;;blacklistnum=0

;
;
s.setfile("$program files$\Winamp\Winamp1\Winamp.ini")
run "Winamp" "/INIDIR=''C:\program files\Winamp\Winamp1'' /CLASS=''Winamp1''"
#6
Through manipulation of the Winamp.m3u and Winamp.m3u8 files you can load playlists specifically.

There are ways to get a playlist to load...

If you want a playlist to load on a place you left off you would have to use
int ret=SendMessage(hwndWinamp,WM_USER, data, id);
id=120 ;;Writes out the current playlist to Winampdir\winamp.m3u, and returns the current position in the playlist.

to write to the ini file.

Some of the stuff is a bit tricky and requires some thought, but quite a bit is possible for winamp!

If you figure out anything on this subject I would love to see your posts.

Jimmy Vig

by the way...I'm not sure if you can load ini files for other programs like this, I just know how to get it to work with winamp.

Gint...Any things you know about???
#7
Thanks for posting your work and the clear explanations!
When I get on to the project, I'll be sure to update with any useful bits...
Steve


Forum Jump:


Users browsing this thread: 1 Guest(s)