• Home
  • Reviews
  • Articles
  • News
  • Tools
  • GamingHeaven
  • Forums
  • Network
 

Go Back   DriverHeaven.net > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > General Discussion

Notices

Reply
 
LinkBack Thread Tools
Old Apr 16, 2003, 03:56 PM   #1
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Guillaume is on a distinguished road

SPDIF bypass command from within other programme

Please have a look at this topic: http://www.hydrogenaudio.org/show.ph...ST/f/27/t/8202
Guillaume is offline   Reply With Quote
Old Apr 16, 2003, 05:46 PM   #2
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 2,952
Eugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of light

one can turn bypass on and off by executing kxctrl from the command line

kxctrl -shw 3 0
kxctrl -shw 3 1

there are additional controllable parameters
refer to ikx.h file in the SDK ("ids for get_hw_parameter")

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 17, 2003, 02:25 AM   #3
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Guillaume is on a distinguished road

That's perfect! Which way has the lowest 'latency' (the bypass should be turned on right after a track stops and immediately turned off again, so that the gap is minimal).
Guillaume is offline   Reply With Quote
Old Apr 17, 2003, 06:08 PM   #4
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 2,952
Eugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of light

I'm afraid that the latency will be rather high
I suggest you download and read the SDK -- the function of interst is iKX::set_hw_parameter

also, you could try using a 'trick' with kX mixer: save the settings file with the only one checkbox enabled -- 'HW Parameters'. if you save two separate *.kx settings files (the one with 'bypass' enabled, and the other - with disabled), you'll be able to load them on-the-fly by executing: kxmixer --shell --load-settings <file_name>

calling "kxmixer --shell ..." is much faster than running kxctrl

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 18, 2003, 12:31 AM   #5
DriverHeaven Junior Member
 
Join Date: Oct 2002
Posts: 30
kode54 is on a distinguished road

As I just realized myself and indicated in that topic, there is no easy way to code a plug-in which will do this and also account for output latency.
kode54 is offline   Reply With Quote
Old Apr 18, 2003, 01:57 AM   #6
kX Project Lead Programmer and Coordinator
 
Join Date: Dec 2002
Posts: 2,952
Eugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of lightEugene Gavrilov is a glorious beacon of light

>> latency

unless you use ikX::get_hw_parameter directly

/Eugene
Eugene Gavrilov is offline   Reply With Quote
Old Apr 18, 2003, 02:42 AM   #7
DriverHeaven Junior Member
 
Join Date: Oct 2002
Posts: 30
kode54 is on a distinguished road

I wasn't referring to latency of executing the command, but latency in the player plug-in which will be triggering this effect. If coded as a DSP, it will receive end-of-track signal as an audio file finishes playing, but at that moment, there will still be an unknown amount of sample chunks from the end of that file waiting in queue for the DSP processing call that receives EOT signal. Not only that, but the output plug-in will also have a full buffer until those samples are processed and flushed. So, with an output latency of 1000ms, the bypass signal may be triggered as much as 1 second before the actual end of track reaches the SPDIF.

It could be coded as a new output plug-in, but I'm not sure if outputs are flushed between tracks or not... might not if they're the same sample rate, or if user has enabled a resampling DSP. Oh, the complications.
kode54 is offline   Reply With Quote
Old Apr 18, 2003, 03:26 AM   #8
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Netherlands
Posts: 24
Guillaume is on a distinguished road

Quote:
Originally posted by kode54
I wasn't referring to latency of executing the command, but latency in the player plug-in which will be triggering this effect. If coded as a DSP, it will receive end-of-track signal as an audio file finishes playing, but at that moment, there will still be an unknown amount of sample chunks from the end of that file waiting in queue for the DSP processing call that receives EOT signal. Not only that, but the output plug-in will also have a full buffer until those samples are processed and flushed. So, with an output latency of 1000ms, the bypass signal may be triggered as much as 1 second before the actual end of track reaches the SPDIF.

It could be coded as a new output plug-in, but I'm not sure if outputs are flushed between tracks or not... might not if they're the same sample rate, or if user has enabled a resampling DSP. Oh, the complications.
That latency of 1000ms you're talking about, is this exactly the same as the buffer size? Shouldn't the plugin be able to delay the ikX::get_hw_parameter command exactly as the time the buffer is set to (could be manually entered into plugin config or got from active output plugin config)???
Guillaume is offline   Reply With Quote
 

 
Powered by: vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Artwork by Allan 'Zardon' Campbell, vBulletin implementation by Craig '5320' Humphreys based on original artwork by Ratchet.

All times are GMT -5. The time now is 05:55 AM. Copyright ©2008 HeavenMedia.net