Что именно делает команда ioctl CDROMPLAYMSF?

Обратите внимание, что для отключения ForwardX11только для github.com вам нужно что-то вроде следующего в вашем~/.ssh/config

Host github.com
    ForwardX11 no

Host *
    ForwardX11 yes

Последние две строки предполагают, что в целом вы /делаете/ хотите перенаправить ваше X-соединение. Это может вызвать путаницу, потому что следующее НЕВЕРНО:

ForwardX11 yes

Host github.com
    ForwardX11 no

Это то, что у меня было (и вызвало у меня бесконечное замешательство ). Это связано с тем, что в.ssh/config первый параметр имеет преимущество и не перезаписывается последующими настройками.

HTH, Дан.

2
06.07.2019, 00:28
2 ответа

Первоначально приводы CD-ROM (в эпоху IDE )имели аналоговое аудиоподключение к материнской плате.Команды SCSI PLAY, STOP, SCANи их варианты затем будут воспроизводить аудио компакт-диски на этом аналоговом выходе, как автономный проигрыватель компакт-дисков.

CDROMPLAYMSFioctl выдает одну из этих команд SCSI, а именно PLAY AUDIO MSF. MSF определяет позицию на компакт-диске (в минутах, секундах, кадрах ).

Внутренние CD-ROM уже давно утратили эту функцию, как и внешние USB-CD-ROM (нет аналогового аудиоподключения к материнской плате ). Так что ваш проигрыватель компакт-дисков по праву игнорирует эту команду.

IIRC библиотека libcdaudioтакже имеет функции для чтения цифровых данных с компакт-диска. Вам нужно использовать их, а затем передать данные в Pulseaudio и т. д. для воспроизведения компакт-диска.

Вы также можете использовать для этого готовые -сделанные командой -линейные инструменты, такие как mplayer cdda://.

3
27.01.2020, 22:02

Из исходного кода ядра Linux :

CDROMPLAYMSF            Play Audio MSF (struct cdrom_msf)

    usage:

      struct cdrom_msf msf;
      ioctl(fd, CDROMPLAYMSF, &msf);

    inputs:
      cdrom_msf structure, describing a segment of music to play

    outputs:    none

    error return:
      ENOSYS    cd drive not audio-capable.

    notes:
      MSF stands for minutes-seconds-frames
      LBA stands for logical block address

      Segment is described as start and end times, where each time
      is described as minutes:seconds:frames.  A frame is 1/75 of
      a second.

Кроме того, этот мой ответ может быть вам полезен.:Получите все определения ioctl из исходников ядра.

Точно так же нашел ответ на ваш вопрос, только немного изменил команду grep:

grep -r 'CDROMPLAYMSF' * | vim -

РЕДАКТИРОВАТЬ

из Компакт _Диск _Цифровой _Аудио #Данные _Структура:

The audio data stream in an audio CD is continuous, but has three parts. The main portion, which is further divided into playable audio tracks, is the program area. This section is preceded by a lead-in track and followed by a lead-out track. The lead-in and lead-out tracks encode only silent audio, but all three sections contain subcode data streams.

The lead-in's subcode contains repeated copies of the disc's Table Of Contents (TOC), which provides an index of the start positions of the tracks in the program area and lead-out. The track positions are referenced by absolute timecode, relative to the start of the program area, in MSF format: minutes, seconds, and fractional seconds called frames. Each timecode frame is one seventy-fifth of a second, and corresponds to a block of 98 channel-data frames—ultimately, a block of 588 pairs of left and right audio samples. Timecode contained in the subchannel data allows the reading device to locate the region of the disc that corresponds to the timecode in the TOC. The TOC on discs is analogous to the partition table on hard drives.

Также из Компакт _Диск _Цифровой _Аудио #Кадры _и _временной код _кадры:

On a Red Book audio CD, data is addressed using the MSF scheme, with timecodes expressed in minutes, seconds and another type of frames (mm:ss:ff), where one frame corresponds to 1/75th of a second of audio: 588 pairs of left and right samples. This timecode frame is distinct from the 33-byte channel-data frame described above, and is used for time display and positioning the reading laser. When editing and extracting CD audio, this timecode frame is the smallest addressable time interval for an audio CD; thus, track boundaries only occur on these frame boundaries. Each of these structures contains 98 channel-data frames, totaling 98 × 24 = 2,352 bytes of music. The CD is played at a speed of 75 frames (or sectors) per second, thus 44,100 samples or 176,400 bytes per second.

In the 1990s, CD-ROM and related Digital Audio Extraction (DAE) technology introduced the term sector to refer to each timecode frame, with each sector being identified by a sequential integer number starting at zero, and with tracks aligned on sector boundaries. An audio CD sector corresponds to 2,352 bytes of decoded data. The Red Book does not refer to sectors, nor does it distinguish the corresponding sections of the disc's data stream except as "frames" in the MSF addressing scheme.

0
27.01.2020, 22:02

Теги

Похожие вопросы