
Recherche avancée
Autres articles (87)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (8939)
-
Anomalie #2519 : SPIP extrêmement lent lorsque je suis connecté à l’interface privée
3 février 2012, par Samuel BurjadeBonjour, Après avoir réinstallé l’ensemble de ma base, plugins et cie à l’identique de mon projet de départ, le problème ne se présente plus... Je n’y comprend rien. Seule certitude à présent, c’est que le problème venait de mon site et non du serveur. Ayant commencé à travailler avec cette version (...)
-
Hit noise when playing part of wave file with ALSA PCM interface
11 décembre 2024, par wangt13I am working a WAVE file playing with ALSA PCM interface in Linux, and I heard noise when I played the file quickly and partially.


Here is my playing function.


static int playback_function(uint8_t *pcm_buf, int pcm_frames)
{
 int rc;
 uint8_t *buf;
 int frame_size, sent;
 int periodsize;
 int left;

 frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
 periodsize = sys_periodsize; // 320 in my system
 buf = pcm_buf;
 left = pcm_frames;
 sent = 0;

 while (left > 0) {
 sent = (left > periodsize) ? periodsize : left;
 rc = snd_pcm_writei(pcm_handle, buf, sent);
 printf("rc: %d, sent: %d\n", rc, sent);
 if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
 snd_pcm_wait(pcm_handle, 10);
 } else if (rc == -EPIPE) {
 snd_pcm_recover(pcm_handle, rc, 0);
 } else if (rc < 0) {
 break;
 }
 if (rc > 0) {
 left -= rc;
 buf += rc * frame_size;
 }
 }
 return rc;
}



The
pcm_buf
andpcm_frames
are got fromswr_convert()
inlibswresample
, in my case, thepcm_frames
is 1187.

By adding
printf("rc: %d, sent: %d\n", rc, sent);
, I got following logs.

rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103



With above function, sometimes I can hear noise when playing the WAVE file quickly and repeatly.

So, how can I improve the WAVE playing without the noise ??

I changed the above function by using filling
0
to the end of data buffer (to enforce silence).

static int playback_test(uint8_t *pcm_buf, int pcm_frames)
{
 uint8_t *buf;
 int trd;
 int rc;
 int left;
 int frame_size, sent;
 int periodsize;
 int aligned = 0;

 frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
 periodsize = sys_periodsize; // 320 in my system

 buf = pcm_buf;
 left = pcm_frames;
 aligned = (left/periodsize + 1) * periodsize;
 memset(buf + left * frame_size, 0, (aligned - left) * frame_size);
 sent = 0;
///left = periodsize; // <== This causes more noise!!

 while (left > 0) {
 sent = (left > periodsize) ? periodsize : left;
 rc = snd_pcm_writei(pcm_handle, buf, sent);
 printf("rc: %d, sent: %d\n", rc, sent);
 if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
 snd_pcm_wait(pcm_handle, 10);
 } else if (rc == -EPIPE) {
 snd_pcm_recover(pcm_handle, rc, 0);
 } else if (rc < 0) {
 break;
 }
 if (rc > 0) {
 left -= rc;
 buf += rc * frame_size;
 }
 }
 return rc;
}



There is NO improvement as of the noise.


-
Evolution #3509 : Visualiser un changelog depuis l’interface des plugins
9 novembre 2015, par jluc -Le cas des changements de version x mérite un traitement spécifique de svp. Car parfois l’incompatibilité est elle qu’il faut vraiment obliger l’utilisateur à en prendre connaissance, d’une manière ou d’une autre.
Ce ticket propose une fonctionnalité qui est éventuellement une réponse à ce besoin, mais peut être y a t il d’autres réponses mieux adaptées qu’un changelog. Et donc je ne sais pas si cette question doit être traitée dans ce ticket ou dans un autre ticket.