Search Results

Search found 2 results on 1 pages for 'pkrish'.

Page 1/1 | 1 

  • Change audio output depending on which one is on

    - by pkrish
    I have a PC that is hooked up to my HDTV (via a long hdmi cable) and to a monitor, which is in another room. I have speakers directly plugged to the PC audio out. The PC is next to the monitor and speakers. I am not sure but I think Windows can play sound on only 1 audio device at a time. And I can only set 1 device as the default output. I can get sound on the TV or speaker depending on which device I set to default. But I would have to do this every time I switch between using my TV or my monitor! Is there some way to configure such that sound plays through the TV if the TV is on, else it plays in the speakers? If this is not possible, then the next best alternative would be to get the sound to play on both the devices at the same time. Thanks!

    Read the article

  • How to mock static member variables

    - by pkrish
    I have a class ClassToTest which has a dependency on ClassToMock. public class ClassToMock { private static final String MEMBER_1 = FileReader.readMemeber1(); protected void someMethod() { ... } } The unit test case for ClassToTest. public class ClassToTestTest { private ClassToMock _mock; @Before public void setUp() throws Exception { _mock = mock(ClassToMock.class) } } When mock is called in the setUp() method, FileReader.readMemeber1(); is executed. Is there a way to avoid this? I think one way is to initialize the MEMBER_1 inside a method. Any other alternatives? Thanks!

    Read the article

1