Forum I Roku Informatyki UW


Join the forum, it's quick and easy

Forum I Roku Informatyki UW
Forum I Roku Informatyki UW
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Zadanie 3

+6
pawel14
Wiezzel
kutino
Krzyszcz
kw
k1391
10 posters

Page 2 of 2 Previous  1, 2

Go down

Zadanie 3 - Page 2 Empty Zadanie 3

Post by k1391 Sun Apr 29, 2012 5:19 pm

First topic message reminder :

Mam problem z programem sox (przynajmniej tak mi się wydaje Wink ). Mam na razie w nadajnik.c taki kawałek kodu:

while(fgets(buffer, PSIZE + 1, stdin) != NULL){ /* PSIZE = 512 */
strncpy(message, buffer, PSIZE);
length = strnlen(message, PSIZE);
puts(message);
}

kompiluję i odpalam w ten sposób:

sox -v -5.0 -S "01 - Welcome To The Jungle.mp3" -r 44100 -b 16 -e signed-integer -c 2 -t raw - | pv -q -L $((44100*4)) | ./nadajnik -a 0.0.0.0 | play -t raw -c 2 -r 44100 -b 16 -e signed-integer --buffer 32768

i to, co wydobywa się z moich głośników to niestety nie muzyka Guns&Roses tylko jakieś szumy i bzyknięcia Crying or Very sad

Wiecie, czy mam jakoś źle skonfigurowany program sox, czy gdzieś indziej jest błąd?

k1391

Liczba postów : 108
Join date : 2010-11-17

Back to top Go down


Zadanie 3 - Page 2 Empty Re: Zadanie 3

Post by Heniek Wed May 09, 2012 12:17 am

Jestem w trybie znakowym Tzn? Mam sprawdzić czy w message'u dostałem taki napis?

Heniek

Liczba postów : 329
Join date : 2010-10-12

Back to top Go down

Zadanie 3 - Page 2 Empty Re: Zadanie 3

Post by Wiezzel Wed May 09, 2012 12:26 am

Ja wczytuję po prostu read-em do bufora i sprawdzam po kolei pierwsze 3 znaki.

Wiezzel

Liczba postów : 18
Join date : 2010-11-24

Back to top Go down

Zadanie 3 - Page 2 Empty Re: Zadanie 3

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum