Летопись МИФИ

Кладезь маленьких безумий


ЕГЭ-2024
Тесты ЕГЭ Онлайн
Задачи ЕГЭ по математике
Решения ЕГЭ по математике

Вступительные экзамены и специальности
Фишки для Корума:
Рейтинг пользователей Корума
Настроение • Модераторы
Темы • Картина дня • Realtime
Прочие фишки:
Нецензурная брань
Народная орфография
Морзянка онлайн • Калькулятор
Анаграммы • Игра в города

Загрузка календаря

Новые записи

20.05Задача про фермера и его кредит
26.01Актуализация сервисов ЕГЭ по математике 2014 года
05.11Поломалось
28.08Смена парадигмы
18.07Как вести себя в приличном обществе, предварительно обмочив штаны
оглавление »

Лучшие записи

1.Математическое порно1563
2.Ответы ко всем задачам ЕГЭ по математике 2010 года793
3.Тесты ЕГЭ Онлайн515
4.Результаты ЕГЭ по математике368
5.Результаты ЕГЭ по русскому языку268

О чем тут?

NX VBAB Webometrics igjhs А1-08 Абитуриенты Бачинский ВКонтакте Ващенифтему Волга Диплом Дрессировка преподов Дума ЕГЭ Жизнь Забабахал Инновации История Кафедра 26 Кларк Корум Лженаука МИФИ МИФИсты Морзянка НИЯУ Нанотехнологии Наука Образование Омоймоск ПЦ Поздравляю Поиск Президент Преподы Приколы Программное обеспечение Рейтинги Русский язык Сессия Смерть Статистика Стихи Сувениринг Тест Учеба Учебные материалы ФЯУ Физтех Фотки Ядерщики матанализ

Комментарии

День памяти
  20 мая 2023 (мифи умер)

Задача про фермера и его кредит
  20 мая 2023 (Алекс)

Математическое порно
  22 марта 2023 (Angleton)

Российский Союз ректоров
  19 февраля 2023 (Hellen Paul )

В помощь юному радисту: Морзянка 1.0
  13 ноября 2022 (Сергей)

Знахари и шаманы в МГТУ имени Баумана
  5 ноября 2021 (монах из кельи)

Зачет по инженерной графике
  24 августа 2020 (Инженерная графика)

Пасынки Вселенной
  18 февраля 2020 (Max Brown)

Финансовая пирамида за 10 рублей
  7 февраля 2020 (Флора Миллс)

База решений задач ЕГЭ по математике
  26 декабря 2019 (Мария)

$kib@t®onЪ
Сейчас на скибатроне
Шедевры
Я ищу слово,  «» 

а б в г д е ё ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я
a b c d e f g h i j k l m n o p q r s t u v w x y z

Слово «speex»
впервые сказано пользователем belkins 25.02.2009 в 20:40,
и с тех пор употреблялось 34 раза.
СообщенияПользователиПользователи (top10)

Сообщения со словом
«speex»

Запрос выполнился за 0.0131 сек.
  1. 27.02.2009, 14:20. Enemy в теме
    «программирование звука unix»
    le рекомендовали именно применительно к speex encode int в общем если есть возможность лучше попробовать и так и так ситуация с read-fread следующая буффер short buf buf size массив из двухбайтных целых длиной 160 чисел итого sizeof buf 320 байт read пишет в этот массив из файла по байтику не более чем указанное их количество то есть 160 получается что в оставшихся 160 байтах останется автоматический мусор но speex encode int этого очевидно не знает и будет обрабатывать...
  2. 26.02.2009, 23:21. Enemy в теме
    «программирование звука unix»
    ... format afmt s16 le а с afmt s16 be то же самое по идее speex encode int должен бы ожидать обычный порядок...
  3. 25.02.2009, 20:40. belkins в теме
    «программирование звука unix»
    ... там воспроизводить в качестве условий использование speex в качестве сжималки я читаю из dev dsp потом кодирую это как в примере http speex org docs manual speex-manual 000000000000000 пишу это в файл потом я беру этот фай декодирую http speex org docs manual speex-manual 000000000000000 как тут и после этого записываю в dev dsp но почему то вместо своего голоса слышу жуткий гул где я косячу это я пишу звук и кодирую код include stdio h include stdlib h include sys ioctl h include unistd h include fcntl h include sys soundcard h include speex speex h define buf size 160 int audio fd out fd void onexit close audio fd close out fd int main int argc char argv char infile int format nchans rate int actlen count file fin fout short buf buf size float input buf size char cbits 2000 int nbbytes holds the state of the encoder void state holds bits so they can be read and written to by the speex routines speexbits bits int i tmp int tmp rate if argc 2 printf команда s filename rate n argv 0 return exit success create a new encoder state in narrowband mode state speex encoder init speex nb mode set the quality to 8 15 kbps tmp 8 speex encoder ctl state speex set quality tmp speex encoder ctl state speex get sampling rate tmp rate printf rate i tmp rate out fd open argv 1 o creat o wronly 0777 fout fopen argv 1 w audio fd open dev dsp o rdonly 0 atexit onexit format afmt s16 le ioctl audio fd sndctl dsp setfmt format if format afmt s16 le printf ошибка запрошенный формат не поддерживается return exit failure nchans 1 ioctl audio fd sndctl dsp channels nchans if argc 3 rate atoi argv 2 else rate 8000 ioctl audio fd sndctl dsp speed rate printf используемая частота дискретизации i гц n rate initialization of the structure that holds the bits speex bits init bits for count 0 count rate 5 nchans count actlen actlen read audio fd buf buf size copy the 16 bits values to float so speex can work on them for i 0 i buf size i input i buf i printf ok n flush all the bits in the struct so we can encode a new frame speex bits reset bits encode the frame i speex encode int state buf bits printf encode i n i copy the bits to an array of char that can be written nbbytes speex bits write bits cbits 2000 write the size of the frame first this is what sampledec expects but it s likely to be different in your own application fwrite nbbytes sizeof int 1 fout write the compressed data fwrite cbits 1 nbbytes fout write out fd buf actlen printf i n actlen destroy the encoder state speex encoder destroy state destroy the bit-packing struct speex bits destroy bits fclose fin fclose fout return exit success это я декодирую и воспроизвожу код include speex speex h include stdio h include stdio h include stdlib h include sys ioctl h include unistd h include fcntl h include sys soundcard h define buf size 160 define frame size 160 int main int argc char argv int audio fd in fd format int nchans rate actlen short buf buf size char outfile file fout fin holds the audio that will be written to file 16 bits per sample short out frame size speex handle samples as float so we need an array of floats float output frame size char cbits 200 int nbbytes holds the state of the decoder void state holds bits so they can be read and written to by the speex routines speexbits bits int i tmp if argc 2 printf команда s filename rate n argv 0 return exit success in fd open argv 1 o rdonly audio fd open dev dsp o wronly 0 format afmt s16 le ioctl audio fd sndctl dsp setfmt format if format afmt s16 le printf ошибка запрошенный формат не поддерживается return exit failure nchans 1 ioctl audio fd sndctl dsp channels nchans if argc 3 rate atoi argv 2 else rate 8000 ioctl audio fd sndctl dsp speed rate printf используемая частота дискретизации i гц n rate the frame size in hardcoded for this sample code but it doesn t have to be create a new decoder state in narrowband mode state speex decoder init speex nb mode set the perceptual enhancement on tmp 1 speex decoder ctl state speex set enh tmp outfile argv 1 fout fopen root c w fin fopen argv 1 r initialization of the structure that holds the bits speex bits init bits while 1 read the size encoded by sampleenc this part will likely be different in your application fread nbbytes sizeof int 1 fin fprintf stderr nbbytes d n nbbytes if feof fin break read the packet encoded by sampleenc fread cbits 1 nbbytes fin copy the data into the bit-stream struct speex bits read from bits cbits nbbytes decode the data i speex decode int state bits out printf decode i i copy from float to short 16 bits for output for i 0 i frame size i out i output i write audio fd out frame size write the decoded audio to file fwrite out sizeof short frame size fout destroy the decoder state speex decoder destroy state destroy the bit-stream truct speex bits destroy bits fclose fout fclose fin return...

← раньше

позже →


Рейтинг блогов



 

откуда • куда • где • eureka!
Бездарно потраченное время:
105819 дней