A
A
Alexander2017-08-16 07:24:31
code review
Alexander, 2017-08-16 07:24:31

Why does the microphone only work in "listen" mode in Windows 7?

There are two microphones - one in the webcam via USB, the second in the audio headset via a regular 3.5 mm jack. I have a Windows 7 PC where none of the microphones have a fluctuating recording level column (neither in the system's audio device window, nor in Skype).
The headset is working, tested on another PC, the recording level sliders are at maximum. However, if in the properties of the microphone on the "Listen" tab, check the box, in fact, "Listen to this device", then the level starts working and the signal from the microphone is transmitted to the speakers.
It seems that the problem is not in the driver: now the last one is installed (and without Realtek software, a clean driver - otherwise it gave an error during installation), it worked with the old one, but stopped a couple of months ago for an unknown reason.
Where to dig? I feel like a lamer.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-04-10
@WarriorKodeK

Offhand:
1. In projects, it is good to use TypeScript, Flow typing. PropTypes should not be used in this case.
2. There is a meaningless condition in the code:

render() {
    const { report = {} } = this.props;
    return (
      <Fragment>
        <Head>
          <title>Doctor problem with {report.doctor.name}</title>
        </Head>
        {report && <ReportDetail showDetailButton={false} data={report} />}
      </Fragment>
    );
  }

report always exists for you. I hope you understand that an empty object is cast to true.
3. We have already written about ESLint/TSLint.
4. Your reducers don't have state keys. Some request may be in progress, but your components do not know about it.
5. It is better to put the logic of working with cookies in actions.
6. It makes no sense to separate imports with indents, just follow the order and see point 3.
7. The __app component can be decomposed.
8. It is not clear why the getter is here 9. Memorization can be used for sorting. ten.
handleChange = (e, key) => {
    const value = e.target.value;
    this.setState({
      [key]: value,
    });
  };

<Input
  id="outlined-name" //  зачем?
  placeholder="Problem Summary"
  value={reportTitle}
  onChange={e => handleChange(e, "reportTitle")}
/>

Can be replaced with:
handleChange = e => {
    const { name, value } = e.target;
    this.setState({
      [name]: value,
    });
  };

<Input
  id="outlined-name" //  зачем?
  placeholder="Problem Summary"
  name="reportTitle"
  value={reportTitle}
  onChange={handleChange}
/>

11. /components/ReportDetail/constants.jswhy?
12. Somewhere requests in actions, somewhere in components.
I am not familiar with next.js, so I can’t say anything objective about the organization of the code, since I don’t fully understand how this framework works. I see that there are no authorized requests yet. API requests will only occur on the client side?

V
Vadik Serebryansky, 2017-08-16
@messi10

Maybe then remove the last driver and install the one with which it worked? + Rialtek, for mother it downloads or includes an audio driver, then open Rialtek and click on the microphone icon - it will be like a pink circle. He will prompt you to choose the assignment to the connector, you will choose the micro. Profit. I had such a PC, everything was configured in the Rialtek program. Especially there are troubles, if there are additional outputs on the front side of the system unit, you need to uncheck some boxes or select the default device to stack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question