Search Results

Search found 361 results on 15 pages for 'fin'.

Page 7/15 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Apple retarde d'un mois la sortie de l'iPad à l'international, victime de son succès aux États-Unis

    Apple a publié le bref message suivant : Citation: Alors que nous avons fourni plus de 500 000 iPads durant la première semaine de commercialisation, la demande est beaucoup plus importante que ce que nous avions prévu et devrait continuer d'excéder notre offre sur les prochaines semaines au fur et à mesure que de plus en plus de gens voient et expérimentent un iPad?. Nous avons aussi enregistré un grand nombre de pré-commandes pour les modèles 3G de l'iPad qui seront livrés fin avril. Au vu de cette étonnamment forte demande aux Eta...

    Read the article

  • Windows Azure : consultez les ressources proposées par Microsoft, participez au Quiz sur Developpez et gagnez des t-shirts et peut-être un Nokia Lumia

    Windows Azure : consultez les ressources proposées par Microsoft participez au Quiz et gagnez des t-shirts et peut-être un Nokia LumiaEn exclusivité pour les lecteurs de Developpez.com, l'équipe de la plateforme Cloud Azure de Microsoft a préparé des vidéos, tutoriels et bien d'autres que nous partageons chaque semaine.À la fin de chaque semaine, des questions vous seront posées. Tous ceux qui auront au minimum 80% de bonnes réponses gagneront un t-shirt et seront de facto sélectionnés pour un...

    Read the article

  • Windows Azure : consultez les ressources proposées par Microsoft, participez au Quiz sur Developpez et gagnez des t-shirts et peut-être un Nokia Lumia

    Windows Azure : consultez les ressources proposées par Microsoft participez au Quiz et gagnez des t-shirts et peut-être un Nokia LumiaEn exclusivité pour les lecteurs de Developpez.com, l'équipe de la plateforme Cloud Azure de Microsoft a préparé des vidéos, tutoriels et bien d'autres que nous partageons chaque semaine.À la fin de chaque semaine, des questions vous seront posées. Tous ceux qui auront au minimum 80 % de bonnes réponses gagneront un t-shirt et seront de facto sélectionnés pour un...

    Read the article

  • Découvrez des trucs, astuces et des tutoriels vidéos sur Windows Azure, seconde partie, par l'équipe Azure de Microsoft

    L'équipe de Azure, la plateforme Cloud de Microsoft, a préparé beaucoup de contenu intéressant, en exclusivité pour les lecteurs de Développez.com. Chaque semaine on va partager ce contenu avec vous. Regardez les vidéos, rejoignez des web events, étudiez les tutoriels. En fin de chaque semaine il y aura des questions, et chaque personne qui répondra correctement à 80 % de ces questions recevra un t-shirt sympa. Le 23 décembre un tirage au sort sera effectué entre tous les gagnants, et le vainqueur...

    Read the article

  • Dark Matter retiré de Steam après le licenciement de l'équipe, le jeu n'était pas complet suite à une campagne KickStarter échouée

    Dark Matter retiré de Steam après le licenciement de l'équipeDark Matter est un Metroid-like et comme de nombreux autres, la première source de financement provient d'une campagne sur KickStarter. Celle-ci n'ayant pas atteinte ses objectifs, le jeu a été publié sans avoir de réelle fin. Le joueur pourra donc lire un frustrant « to be continued » laissant présagé un second épisode. Malheureusement, les développeurs du jeu ont été licencié suite à l'échec de la campagne KickStarter et ne recevra...

    Read the article

  • DRM et HTML5 : Mozilla s'oppose farouchement aux travaux du W3C, qui sont hostiles pour les utilisateurs, l'open source et les éditeurs de navigateurs

    DRM et HTML5 : Mozilla s'oppose farouchement aux travaux du W3C qui sont hostiles pour les utilisateurs, l'open source et les éditeurs de navigateursLa prise en charge des DRM dans le HTML5 continue à diviser les acteurs du Web. La fondation Mozilla s'oppose fermement aux travaux du W3C sur le support des DRM dans HTML5.L'un des objectifs du HTML5 étant de mettre fin à l'utilisation des outils tiers comme Flash ou Silverlight sur le Web, un lobbying constitué de Microsoft, Google et Netflix avait...

    Read the article

  • Kantar publie ses statistiques sur l'évolution trimestrielle du marché du smartphone, Samsung se rapproche d'Apple aux USA

    Kantar publie ses statistiques sur l'évolution trimestrielle du marché du smartphone, Samsung se rapproche d'Apple aux USA L'agence Kantar vient de publier les chiffres du dernier trimestre (achevé en en fin avril 2014) sur le marché mondial du smartphone. Au niveau européen, très peu de changement sont notés par rapport à l'année dernière où Android s'est octroyé 70,7 % de part de marché contre 72,4 % de février à avril 2014, ce qui représente une progression de 1,7 point. Windows Phone a occupé...

    Read the article

  • HP renoue avec la croissance de son chiffre d'affaires au troisième trimestre, avec des revenus boostés par la vente d'ordinateurs

    HP renoue avec la croissance de son chiffre d'affaires au troisième trimestre, avec des revenus boostés par la vente d'ordinateurs Sur son troisième trimestre achevé fin juillet, HP a déclaré une progression de son chiffre d'affaires d'1% qui est désormais à 27,6 milliards de dollars et un bénéfice par action (non GAAP) s'établissant à 89 cents pour (progression de 3%). Ce résultat est supérieur aux prévisions des analystes qui tablaient sur un chiffre d'affaires de 27,01 milliards (soit une...

    Read the article

  • Le moteur de recherche Google utilisé pour des injections SQL, un expert en sécurité présente un scénario d'attaque

    Le moteur de recherche Google utilisé pour des injections SQL un expert en sécurité présente un scénario d'attaque Les pirates ne manquent pas d'idées pour parvenir à leur fin. Les robots d'indexation du moteur Google auraient été exploités par certains pour effectuer des attaques par injection SQL.Qu'allez-vous faire si un robot d'indexation légitime de Google a été utilisé pour attaquer votre site ? Devrez-vous bloquer le bot (entraînant par la même occasion l'indexation de votre site), ou autoriser...

    Read the article

  • Chrome 32 bêta sort avec un indicateur d'onglets qui jouent un son, une vidéo, utilisent la webcam ou diffusent sur la TV

    Chrome 32 bêta sort avec un indicateur d'onglets qui jouent un son une vidéo, utilisent la webcam ou diffusent sur la TVFidèle à son rythme de sortie des nouvelles versions de Chrome, Google vient de dévoiler la bêta de la version 32 du navigateur pour Windows, Mac et Linux, avec comme nouveauté phare une fonctionnalité permettant d'identifier rapidement les onglets bruyants, ceux qui utilisent la webcam, ainsi que ceux en diffusion sur votre télévision.En gestation depuis fin février sur le canal...

    Read the article

  • Microsoft ouvre les précommandes de Kinect pour Windows v2, le capteur sera expédié aux développeurs en juillet avec la bêta de son SDK

    Microsoft ouvre les précommandes de Kinect pour Windows v2 le capteur sera expédié aux développeurs en juillet avec la bêta de son SDKEn fin nombre de l'année dernière, seul un nombre très limité de développeurs avait eu l'opportunité de recevoir une préversion de la seconde génération du capteur de mouvements et de reconnaissance vocale Kinect pour Windows. Pour recevoir le dispositif, il fallait s'enregistrer au programme en déboursant 399 dollars.Ceux qui n'ont pas eu la chance de recevoir...

    Read the article

  • Windows 8 : Vupen refuse de donner ses failles 0-days à des « multi-milliardaires » comme Microsoft, le français les garde pour ses clients

    Vupen content que des chercheurs de failles ne les livrent pas à des éditeurs « multi-milliardaires » Et vend les 0-days de Windows 8 à ses clients sans les communiquer à Microsoft Fin octobre, Vupen avait affirmé par la voix de son PDG - Chaouki BEKRAR - avoir découvert plusieurs failles dans IE 10 qui permettaient de corrompre Windows 8. Et ce malgré les avancés du système de sécurité du nouvel OS. La société basée à Montpellier n'a donné depuis aucune information sur son exploit (au sens informatique du terme). Elle a revanche immédiatement

    Read the article

  • Droit à l'oubli : 12 000 requêtes reçues par Google en une journée, après le lancement de son formulaire

    Droit à l'oubli : 12 000 requêtes reçues par Google en une journée après le lancement du formulaire de demande de suppression des données sensiblesEn fin de semaine dernière, Google lançait un formulaire en ligne pour permettre aux internautes européens de signaler en quelques clics qu'ils ne souhaitaient plus voir des liens vers des informations sensibles les concernant affichés dans les résultats du moteur de recherche.En seulement une journée après l'ouverture des soumissions, le géant de la...

    Read the article

  • Windows 8 : Vupen refuse de donner ses failles 0-days à des « multi-milliardaires » comme Microsoft, le français préfère les vendre

    Vupen content que des chercheurs de failles ne les livrent pas à des éditeurs « multi-milliardaires » Et vend les 0-days de Windows 8 à ses clients sans les communiquer à Microsoft Fin octobre, Vupen avait affirmé par la voix de son PDG - Chaouki BEKRAR - avoir découvert plusieurs failles dans Internet Explorer 10 qui permettaient de corrompre Windows 8. Et ce malgré les avancés du système de sécurité du nouvel OS. La société basée à Montpellier n'a donné depuis aucune information sur son exploit (au sens informatique du terme). Elle a, en revanche, immédiatement

    Read the article

  • Découvrez les projets de start-ups 2013 des étudiants de l'Epitech les 15 et 16 novembre, chaque année un sur cinq devient une vraie entreprise

    Découvrez les projets de start-ups 2013 des étudiants de l'Epitech Les 15 et 16 novembre prochains, chaque année un sur cinq devient une vraie entrepriseComme chaque année depuis maintenant 8 ans, l'école d'informatique EPITECH organise un évènement pour présenter au public (et aux investisseurs) les différents projets de start-ups réalisés par ses étudiants dans le cadre de leur cursus de fin de formation.Les Epitech Innovative Project (EIP) n'ont pas grand-chose à voir avec les prototypages issus...

    Read the article

  • Packets being dropped by iptables

    - by Shadyabhi
    I am trying to create a Software Access Point in linux. I followed the blog here. Steps I performed: Started dhcp server on wlan0. Properly configured hostapd.conf Enabled packet forwarding & masquerading. Two commands executed regarding iptables: iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface wlan0 -j ACCEPT I enabled logging on iptables & I get this in everything.log Jun 29 19:42:03 MBP-archlinux kernel: [10480.180356] IN=eth0 OUT=wlan0 MAC=c8:bc:c8:9b:c4:3c:00:13:80:40:cd:80:08:00 SRC=195.143.92.150 DST=10.0.0.3 LEN=44 TOS=0x00 PREC=0x00 TTL=52 ID=38025 PROTO=TCP SPT=80 DPT=53570 WINDOW=46185 RES=0x00 ACK URGP=0 Jun 29 19:42:03 MBP-archlinux kernel: [10480.389102] IN=eth0 OUT=wlan0 MAC=c8:bc:c8:9b:c4:3c:00:13:80:40:cd:80:08:00 SRC=195.143.92.150 DST=10.0.0.3 LEN=308 TOS=0x00 PREC=0x00 TTL=52 ID=14732 PROTO=TCP SPT=80 DPT=53570 WINDOW=46185 RES=0x00 ACK PSH URGP=0 Jun 29 19:42:03 MBP-archlinux kernel: [10480.389710] IN=eth0 OUT=wlan0 MAC=c8:bc:c8:9b:c4:3c:00:13:80:40:cd:80:08:00 SRC=195.143.92.150 DST=10.0.0.3 LEN=44 TOS=0x00 PREC=0x00 TTL=52 ID=14988 PROTO=TCP SPT=80 DPT=53570 WINDOW=46185 RES=0x00 ACK FIN URGP=0 Jun 29 19:42:03 MBP-archlinux kernel: [10480.621118] IN=eth0 OUT=wlan0 MAC=c8:bc:c8:9b:c4:3c:00:13:80:40:cd:80:08:00 SRC=195.143.92.150 DST=10.0.0.3 LEN=44 TOS=0x00 PREC=0x00 TTL=52 ID=63378 PROTO=TCP SPT=80 DPT=53570 WINDOW=46185 RES=0x00 ACK FIN URGP=0 I have almost no knowledge of iptables, all I did was through googling. So, can anyone help me in making me understand what wrong is happening here? I have tried running tcpdump on wlan0 & http packets are being sent from wlan0.

    Read the article

  • Does this code follow the definition of recursion?

    - by dekz
    Hi All, I have a piece of code which I am doubting it as a implementation of recursion by its definition. My understanding is that the code must call itself, the exact same function. I also question whether writing the code this way adds additional overhead which can be seen with the use of recursion. What are your thoughts? class dhObject { public: dhObject** children; int numChildren; GLdouble linkLength; //ai GLdouble theta; //angle of rot about the z axis GLdouble twist; //about the x axis GLdouble displacement; // displacement from the end point of prev along z GLdouble thetaMax; GLdouble thetaMin; GLdouble thetaInc; GLdouble direction; dhObject(ifstream &fin) { fin >> numChildren >> linkLength >> theta >> twist >> displacement >> thetaMax >> thetaMin; //std::cout << numChildren << std::endl; direction = 1; thetaInc = 1.0; if (numChildren > 0) { children = new dhObject*[numChildren]; for(int i = 0; i < numChildren; ++i) { children[i] = new dhObject(fin); } } } void traverse(void) { glPushMatrix(); //draw move initial and draw transform(); draw(); //draw children for(int i = 0; i < numChildren; ++i) { children[i]->traverse(); } glPopMatrix(); } void update(void) { //Update the animation, if it has finished all animation go backwards if (theta <= thetaMin) { thetaInc = 1.0; } else if (theta >= thetaMax) { thetaInc = -1.0; } theta += thetaInc; //std::cout << thetaMin << " " << theta << " " << thetaMax << std::endl; for(int i = 0; i < numChildren; ++i) { children[i]->update(); } } void draw(void) { glPushMatrix(); glColor3f (0.0f,0.0f,1.0f); glutSolidCube(0.1); glPopMatrix(); } void transform(void) { //Move in the correct way, R, T, T, R glRotatef(theta, 0, 0, 1.0); glTranslatef(0,0,displacement); glTranslatef(linkLength, 0,0); glRotatef(twist, 1.0,0.0,0.0); } };

    Read the article

  • First time using select(), maybe a basic question?

    - by darkletter
    Hello people, i've been working for a few days with this server using select(). What it does, is that, i have two arrays of clients (one is "suppliers", and the other is "consumers"), and the mission of the server is to check whether the suppliers have something to send to the consumers, and in case affirmative, send it. The second part of the server is that, when the consumers have received the suppliers' info, they send a confirmation message to the same suppliers that sent the info. When a client connects, it gets recognized as "undefined", until it sends a message with the word "supplier" or "consumer" (in Spanish, as i'm from there), when the server puts it in the correct clients array. Well, what the server does is not very important here. What's important is that, i'm doing both parts with two different "for" loops, and that's where i'm getting the problems. When the first user connects to the server (be it a supplier or a consumer), the server gets stuck in the first or second loop, instead of just continuing its execution. As it's the first time i'm using select(), i may be missing something. Could you guys give me any sort of help? Thanks a lot in advance. for(;;) { rset=allset; nready=select(maxfd+1,&rset,NULL,NULL,NULL); if (FD_ISSET(sockfd, &rset)){ clilen=sizeof(cliente); if((connfd=accept(sockfd,(struct sockaddr *)&cliente,&clilen))<0) printf("Error"); IP=inet_ntoa(cliente.sin_addr); for(i=0;i<COLA;i++){if(indef[i]<0){indef[i]=connfd;IPind[i]=IP;break;}} FD_SET(connfd,&allset); if(connfd > maxfd) maxfd=connfd; if(i>maxii) maxii=i; if(--nready<=0) continue; }// Fin ISSET(sockfd) for(i=0;i<=maxii;i++){ if((sockfd1=indef[i])<0){ continue;} //! if(FD_ISSET(sockfd1,&rset)){ if((n=read(sockfd1,comp,MAXLINE))==0){close(sockfd1);FD_CLR(sockfd1,&allset);indef[i]=-1;printf("Cliente indefinido desconectado \n");} else{ comp[n]='\0'; if(strcmp(comp,"suministrador")==0){ for(j=0;j<=limite;j++){if(sumi[j]<0){IPsum[j]=IPind[i];sumi[j]=indef[i]; indef[i]=-1;if(j>maxis) {maxis=j;}break; } } } else if(strcmp(comp,"consumidor")==0){ for(o=0;j<=limite;j++){if(consum[o]<0){IPcons[o]=IPind[i];consum[o]=indef[i]; indef[o]=-1;if(o>maxic) {maxic=o;}break; } } } if(--nready <=0)break; } } }//fin bucle for maxii for(i=0;i<=maxis;i++){ if((sockfd2=sumi[i])<0){continue;} if(FD_ISSET(sockfd2,&rset)){ if((n=read(sockfd2,buffer2,MAXLINE))==0){close(sockfd2);FD_CLR(sockfd2,&allset);sumi[i]=-1;printf("Suministrador desconectado \n");} else{ buffer2[n]='\0'; for(j=0;j<=maxic;j++){ if((sockfd3=consum[j])<0){ continue;} else {strcpy(final,IPsum[i]);strcat(final,":");strcat(final,buffer2);write(sockfd3,final,sizeof(final));respuesta[i]=1;} } break; // ? } } }//fin for maxis for(i=miniic;i<=maxic;i++){ if((sockfd4=consum[i])<0){continue;} if(FD_ISSET(sockfd4,&rset)){ if((n=read(sockfd4,buffer3,MAXLINE))==0){close(sockfd4);FD_CLR(sockfd4,&allset);consum[i]=-1;printf("Consumidor desconectado \n");} else{ buffer3[n]='\0'; IP2=strtok(buffer3,":"); obj=strtok(NULL,":"); for(j=0;j<100;j++){ if((strcmp(IPsum[j],IP2)==0) && (respuesta[j]==1)) {write(sumi[j],obj,sizeof(obj)); miniic=i+1; respuesta[j]=0; break; } } } } }

    Read the article

  • Conceal packet loss in PCM stream

    - by ZeroDefect
    I am looking to use 'Packet Loss Concealment' to conceal lost PCM frames in an audio stream. Unfortunately, I cannot find a library that is accessible without all the licensing restrictions and code bloat (...up for some suggestions though). I have located some GPL code written by Steve Underwood for the Asterisk project which implements PLC. There are several limitations; although, as Steve suggests in his code, his algorithm can be applied to different streams with a bit of work. Currently, the code works with 8kHz 16-bit signed mono streams. Variations of the code can be found through a simple search of Google Code Search. My hope is that I can adapt the code to work with other streams. Initially, the goal is to adjust the algorithm for 8+ kHz, 16-bit signed, multichannel audio (all in a C++ environment). Eventually, I'm looking to make the code available under the GPL license in hopes that it could be of benefit to others... Attached is the code below with my efforts. The code includes a main function that will "drop" a number of frames with a given probability. Unfortunately, the code does not quite work as expected. I'm receiving EXC_BAD_ACCESS when running in gdb, but I don't get a trace from gdb when using 'bt' command. Clearly, I'm trampimg on memory some where but not sure exactly where. When I comment out the *amdf_pitch* function, the code runs without crashing... int main (int argc, char *argv[]) { std::ifstream fin("C:\\cc32kHz.pcm"); if(!fin.is_open()) { std::cout << "Failed to open input file" << std::endl; return 1; } std::ofstream fout_repaired("C:\\cc32kHz_repaired.pcm"); if(!fout_repaired.is_open()) { std::cout << "Failed to open output repaired file" << std::endl; return 1; } std::ofstream fout_lossy("C:\\cc32kHz_lossy.pcm"); if(!fout_lossy.is_open()) { std::cout << "Failed to open output repaired file" << std::endl; return 1; } audio::PcmConcealer Concealer; Concealer.Init(1, 16, 32000); //Generate random numbers; srand( time(NULL) ); int value = 0; int probability = 5; while(!fin.eof()) { char arr[2]; fin.read(arr, 2); //Generate's random number; value = rand() % 100 + 1; if(value <= probability) { char blank[2] = {0x00, 0x00}; fout_lossy.write(blank, 2); //Fill in data; Concealer.Fill((int16_t *)blank, 1); fout_repaired.write(blank, 2); } else { //Write data to file; fout_repaired.write(arr, 2); fout_lossy.write(arr, 2); Concealer.Receive((int16_t *)arr, 1); } } fin.close(); fout_repaired.close(); fout_lossy.close(); return 0; } PcmConcealer.hpp /* * Code adapted from Steve Underwood of the Asterisk Project. This code inherits * the same licensing restrictions as the Asterisk Project. */ #ifndef __PCMCONCEALER_HPP__ #define __PCMCONCEALER_HPP__ /** 1. What does it do? The packet loss concealment module provides a suitable synthetic fill-in signal, to minimise the audible effect of lost packets in VoIP applications. It is not tied to any particular codec, and could be used with almost any codec which does not specify its own procedure for packet loss concealment. Where a codec specific concealment procedure exists, the algorithm is usually built around knowledge of the characteristics of the particular codec. It will, therefore, generally give better results for that particular codec than this generic concealer will. 2. How does it work? While good packets are being received, the plc_rx() routine keeps a record of the trailing section of the known speech signal. If a packet is missed, plc_fillin() is called to produce a synthetic replacement for the real speech signal. The average mean difference function (AMDF) is applied to the last known good signal, to determine its effective pitch. Based on this, the last pitch period of signal is saved. Essentially, this cycle of speech will be repeated over and over until the real speech resumes. However, several refinements are needed to obtain smooth pleasant sounding results. - The two ends of the stored cycle of speech will not always fit together smoothly. This can cause roughness, or even clicks, at the joins between cycles. To soften this, the 1/4 pitch period of real speech preceeding the cycle to be repeated is blended with the last 1/4 pitch period of the cycle to be repeated, using an overlap-add (OLA) technique (i.e. in total, the last 5/4 pitch periods of real speech are used). - The start of the synthetic speech will not always fit together smoothly with the tail of real speech passed on before the erasure was identified. Ideally, we would like to modify the last 1/4 pitch period of the real speech, to blend it into the synthetic speech. However, it is too late for that. We could have delayed the real speech a little, but that would require more buffer manipulation, and hurt the efficiency of the no-lost-packets case (which we hope is the dominant case). Instead we use a degenerate form of OLA to modify the start of the synthetic data. The last 1/4 pitch period of real speech is time reversed, and OLA is used to blend it with the first 1/4 pitch period of synthetic speech. The result seems quite acceptable. - As we progress into the erasure, the chances of the synthetic signal being anything like correct steadily fall. Therefore, the volume of the synthesized signal is made to decay linearly, such that after 50ms of missing audio it is reduced to silence. - When real speech resumes, an extra 1/4 pitch period of sythetic speech is blended with the start of the real speech. If the erasure is small, this smoothes the transition. If the erasure is long, and the synthetic signal has faded to zero, the blending softens the start up of the real signal, avoiding a kind of "click" or "pop" effect that might occur with a sudden onset. 3. How do I use it? Before audio is processed, call plc_init() to create an instance of the packet loss concealer. For each received audio packet that is acceptable (i.e. not including those being dropped for being too late) call plc_rx() to record the content of the packet. Note this may modify the packet a little after a period of packet loss, to blend real synthetic data smoothly. When a real packet is not available in time, call plc_fillin() to create a sythetic substitute. That's it! */ /*! Minimum allowed pitch (66 Hz) */ #define PLC_PITCH_MIN(SAMPLE_RATE) ((double)(SAMPLE_RATE) / 66.6) /*! Maximum allowed pitch (200 Hz) */ #define PLC_PITCH_MAX(SAMPLE_RATE) ((SAMPLE_RATE) / 200) /*! Maximum pitch OLA window */ //#define PLC_PITCH_OVERLAP_MAX(SAMPLE_RATE) ((PLC_PITCH_MIN(SAMPLE_RATE)) >> 2) /*! The length over which the AMDF function looks for similarity (20 ms) */ #define CORRELATION_SPAN(SAMPLE_RATE) ((20 * (SAMPLE_RATE)) / 1000) /*! History buffer length. The buffer must also be at leat 1.25 times PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for the pitch assessment. */ //#define PLC_HISTORY_LEN(SAMPLE_RATE) ((CORRELATION_SPAN(SAMPLE_RATE)) + (PLC_PITCH_MIN(SAMPLE_RATE))) namespace audio { typedef struct { /*! Consecutive erased samples */ int missing_samples; /*! Current offset into pitch period */ int pitch_offset; /*! Pitch estimate */ int pitch; /*! Buffer for a cycle of speech */ float *pitchbuf;//[PLC_PITCH_MIN]; /*! History buffer */ short *history;//[PLC_HISTORY_LEN]; /*! Current pointer into the history buffer */ int buf_ptr; } plc_state_t; class PcmConcealer { public: PcmConcealer(); ~PcmConcealer(); void Init(int channels, int bit_depth, int sample_rate); //Process a block of received audio samples. int Receive(short amp[], int frames); //Fill-in a block of missing audio samples. int Fill(short amp[], int frames); void Destroy(); private: int amdf_pitch(int min_pitch, int max_pitch, short amp[], int channel_index, int frames); void save_history(plc_state_t *s, short *buf, int channel_index, int frames); void normalise_history(plc_state_t *s); /** Holds the states of each of the channels **/ std::vector< plc_state_t * > ChannelStates; int plc_pitch_min; int plc_pitch_max; int plc_pitch_overlap_max; int correlation_span; int plc_history_len; int channel_count; int sample_rate; bool Initialized; }; } #endif PcmConcealer.cpp /* * Code adapted from Steve Underwood of the Asterisk Project. This code inherits * the same licensing restrictions as the Asterisk Project. */ #include "audio/PcmConcealer.hpp" /* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */ #define ATTENUATION_INCREMENT 0.0025 /* Attenuation per sample */ #if !defined(INT16_MAX) #define INT16_MAX (32767) #define INT16_MIN (-32767-1) #endif #ifdef WIN32 inline double rint(double x) { return floor(x + 0.5); } #endif inline short fsaturate(double damp) { if (damp > 32767.0) return INT16_MAX; if (damp < -32768.0) return INT16_MIN; return (short)rint(damp); } namespace audio { PcmConcealer::PcmConcealer() : Initialized(false) { } PcmConcealer::~PcmConcealer() { Destroy(); } void PcmConcealer::Init(int channels, int bit_depth, int sample_rate) { if(Initialized) return; if(channels <= 0 || bit_depth != 16) return; Initialized = true; channel_count = channels; this->sample_rate = sample_rate; ////////////// double min = PLC_PITCH_MIN(sample_rate); int imin = (int)min; double max = PLC_PITCH_MAX(sample_rate); int imax = (int)max; plc_pitch_min = imin; plc_pitch_max = imax; plc_pitch_overlap_max = (plc_pitch_min >> 2); correlation_span = CORRELATION_SPAN(sample_rate); plc_history_len = correlation_span + plc_pitch_min; ////////////// for(int i = 0; i < channel_count; i ++) { plc_state_t *t = new plc_state_t; memset(t, 0, sizeof(plc_state_t)); t->pitchbuf = new float[plc_pitch_min]; t->history = new short[plc_history_len]; ChannelStates.push_back(t); } } void PcmConcealer::Destroy() { if(!Initialized) return; while(ChannelStates.size()) { plc_state_t *s = ChannelStates.at(0); if(s) { if(s->history) delete s->history; if(s->pitchbuf) delete s->pitchbuf; memset(s, 0, sizeof(plc_state_t)); delete s; } ChannelStates.erase(ChannelStates.begin()); } ChannelStates.clear(); Initialized = false; } //Process a block of received audio samples. int PcmConcealer::Receive(short amp[], int frames) { if(!Initialized) return 0; int j = 0; for(int k = 0; k < ChannelStates.size(); k++) { int i; int overlap_len; int pitch_overlap; float old_step; float new_step; float old_weight; float new_weight; float gain; plc_state_t *s = ChannelStates.at(k); if (s->missing_samples) { /* Although we have a real signal, we need to smooth it to fit well with the synthetic signal we used for the previous block */ /* The start of the real data is overlapped with the next 1/4 cycle of the synthetic data. */ pitch_overlap = s->pitch >> 2; if (pitch_overlap > frames) pitch_overlap = frames; gain = 1.0 - s->missing_samples * ATTENUATION_INCREMENT; if (gain < 0.0) gain = 0.0; new_step = 1.0/pitch_overlap; old_step = new_step*gain; new_weight = new_step; old_weight = (1.0 - new_step)*gain; for (i = 0; i < pitch_overlap; i++) { int index = (i * channel_count) + j; amp[index] = fsaturate(old_weight * s->pitchbuf[s->pitch_offset] + new_weight * amp[index]); if (++s->pitch_offset >= s->pitch) s->pitch_offset = 0; new_weight += new_step; old_weight -= old_step; if (old_weight < 0.0) old_weight = 0.0; } s->missing_samples = 0; } save_history(s, amp, j, frames); j++; } return frames; } //Fill-in a block of missing audio samples. int PcmConcealer::Fill(short amp[], int frames) { if(!Initialized) return 0; int j =0; for(int k = 0; k < ChannelStates.size(); k++) { short *tmp = new short[plc_pitch_overlap_max]; int i; int pitch_overlap; float old_step; float new_step; float old_weight; float new_weight; float gain; short *orig_amp; int orig_len; orig_amp = amp; orig_len = frames; plc_state_t *s = ChannelStates.at(k); if (s->missing_samples == 0) { // As the gap in real speech starts we need to assess the last known pitch, //and prepare the synthetic data we will use for fill-in normalise_history(s); s->pitch = amdf_pitch(plc_pitch_min, plc_pitch_max, s->history + plc_history_len - correlation_span - plc_pitch_min, j, correlation_span); // We overlap a 1/4 wavelength pitch_overlap = s->pitch >> 2; // Cook up a single cycle of pitch, using a single of the real signal with 1/4 //cycle OLA'ed to make the ends join up nicely // The first 3/4 of the cycle is a simple copy for (i = 0; i < s->pitch - pitch_overlap; i++) s->pitchbuf[i] = s->history[plc_history_len - s->pitch + i]; // The last 1/4 of the cycle is overlapped with the end of the previous cycle new_step = 1.0/pitch_overlap; new_weight = new_step; for ( ; i < s->pitch; i++) { s->pitchbuf[i] = s->history[plc_history_len - s->pitch + i]*(1.0 - new_weight) + s->history[plc_history_len - 2*s->pitch + i]*new_weight; new_weight += new_step; } // We should now be ready to fill in the gap with repeated, decaying cycles // of what is in pitchbuf // We need to OLA the first 1/4 wavelength of the synthetic data, to smooth // it into the previous real data. To avoid the need to introduce a delay // in the stream, reverse the last 1/4 wavelength, and OLA with that. gain = 1.0; new_step = 1.0/pitch_overlap; old_step = new_step; new_weight = new_step; old_weight = 1.0 - new_step; for (i = 0; i < pitch_overlap; i++) { int index = (i * channel_count) + j; amp[index] = fsaturate(old_weight * s->history[plc_history_len - 1 - i] + new_weight * s->pitchbuf[i]); new_weight += new_step; old_weight -= old_step; if (old_weight < 0.0) old_weight = 0.0; } s->pitch_offset = i; } else { gain = 1.0 - s->missing_samples*ATTENUATION_INCREMENT; i = 0; } for ( ; gain > 0.0 && i < frames; i++) { int index = (i * channel_count) + j; amp[index] = s->pitchbuf[s->pitch_offset]*gain; gain -= ATTENUATION_INCREMENT; if (++s->pitch_offset >= s->pitch) s->pitch_offset = 0; } for ( ; i < frames; i++) { int index = (i * channel_count) + j; amp[i] = 0; } s->missing_samples += orig_len; save_history(s, amp, j, frames); delete [] tmp; j++; } return frames; } void PcmConcealer::save_history(plc_state_t *s, short *buf, int channel_index, int frames) { if (frames >= plc_history_len) { /* Just keep the last part of the new data, starting at the beginning of the buffer */ //memcpy(s->history, buf + len - plc_history_len, sizeof(short)*plc_history_len); int frames_to_copy = plc_history_len; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * (i + frames - plc_history_len)) + channel_index; s->history[i] = buf[index]; } s->buf_ptr = 0; return; } if (s->buf_ptr + frames > plc_history_len) { /* Wraps around - must break into two sections */ //memcpy(s->history + s->buf_ptr, buf, sizeof(short)*(plc_history_len - s->buf_ptr)); short *hist_ptr = s->history + s->buf_ptr; int frames_to_copy = plc_history_len - s->buf_ptr; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * i) + channel_index; hist_ptr[i] = buf[index]; } frames -= (plc_history_len - s->buf_ptr); //memcpy(s->history, buf + (plc_history_len - s->buf_ptr), sizeof(short)*len); frames_to_copy = frames; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * (i + (plc_history_len - s->buf_ptr))) + channel_index; s->history[i] = buf[index]; } s->buf_ptr = frames; return; } /* Can use just one section */ //memcpy(s->history + s->buf_ptr, buf, sizeof(short)*len); short *hist_ptr = s->history + s->buf_ptr; int frames_to_copy = frames; for(int i = 0; i < frames_to_copy; i ++) { int index = (channel_count * i) + channel_index; hist_ptr[i] = buf[index]; } s->buf_ptr += frames; } void PcmConcealer::normalise_history(plc_state_t *s) { short *tmp = new short[plc_history_len]; if (s->buf_ptr == 0) return; memcpy(tmp, s->history, sizeof(short)*s->buf_ptr); memcpy(s->history, s->history + s->buf_ptr, sizeof(short)*(plc_history_len - s->buf_ptr)); memcpy(s->history + plc_history_len - s->buf_ptr, tmp, sizeof(short)*s->buf_ptr); s->buf_ptr = 0; delete [] tmp; } int PcmConcealer::amdf_pitch(int min_pitch, int max_pitch, short amp[], int channel_index, int frames) { int i; int j; int acc; int min_acc; int pitch; pitch = min_pitch; min_acc = INT_MAX; for (i = max_pitch; i <= min_pitch; i++) { acc = 0; for (j = 0; j < frames; j++) { int index1 = (channel_count * (i+j)) + channel_index; int index2 = (channel_count * j) + channel_index; //std::cout << "Index 1: " << index1 << ", Index 2: " << index2 << std::endl; acc += abs(amp[index1] - amp[index2]); } if (acc < min_acc) { min_acc = acc; pitch = i; } } std::cout << "Pitch: " << pitch << std::endl; return pitch; } } P.S. - I must confess that digital audio is not my forte...

    Read the article

  • Speaker Idol Montréal

    - by pluginbaby
    C’est le grand retour du concours Speaker Idol de la Communauté .NET Montréal!!! Pour le dernier meeting de l'année nous vous invitons à venir présenter votre techno préférée, votre librairie fétiche, votre projet open source innovateur ou tout autre sujet touchant le développement logiciel.  En fait, le choix de la techno n'est pas si important, ce qui l'est c'est de gagner de l'expérience pour présenter un sujet technique.  C'est un "soft skill" qui est primordial dans le développement de votre carrière.  En effet, vous aurez à faire des présentations à des clients ou à vos patrons. Une présentation bâclée ou mal présentée peut être un frein à un projet, une vente ou même une promotion. > Rappelez-vous que ce qui sera jugé est votre présentation et non la techno que vous présentez.   L’aventure vous tente ? Nous vous suggérons de visionner la formation Plurasight gratuite "Get Involved" de Scott Hanselman et Jeff Attwood: http://getinvolved.hanselman.com Ainsi que: Professional Technical Speaker Tips 11 Top Tips for a Successful Technical Presentation Tips for Preparing for a Technical Presentation Prix* à gagner pour les présentateurs: 1 Xbox One*!! 1 certificat* pour formation gratuite au choix chez Intertech.com 1 licence* Telerik DevCraft Complete 1 licence* Jetbrains au choix (dont resharper) 1 licence* Mindscape au choix (sauf MegaPack) 2 licences* de Cerebrata Azure Management Studio *Les prix (sauf la XBox One) sont des gracieusetés des fabricants.  Sans aucun engagement de la part de la Communauté .NET. Informations sur le concours Présentation de 10 minutes: en français ou en anglais, avec support visuel comme un PowerPoint et du code. Attention, 10 minutes c'est très court pour les démos en direct.  Assurez-vous d'introduire votre sujet, d'expliquer la problématique qu'il essaie de régler, de le démontrer et de conclure/résumer à la fin.  Et le tout en seulement 10 minutes!  Oui c'est un gros défi alors assurez-vous de vous concentrer sur l'essentiel et le message que vous voulez passer. Une première présentation en publique: Le concours est ouvert uniquement aux personnes qui n'ont jamais fait de présentation technique dans un user group ou une conférence. Date limite: Vous avez jusqu'au lundi 26 mai 23h59 pour soumettre votre candidature. Veuillez envoyer une brève description (200 mots max.) de votre présentation ainsi que votre bio à [email protected] Nombre maximum de participants: Parmi les candidatures reçus, les 8 meilleures seront choisies pour présenter. L'annonce des candidatures retenues sera faite le vendredi 30 mai. L'ordre des présentations: En ordre alphabétique des noms de famille. Panel d'expert: Après chaque présentation un panel d'expert va donner un retour aux participants basé sur Maitrise du sujet Qualité de la présentation Aptitude à faire passer votre message Qualité du PowerPoint Important: les experts sont là pour vous aider à vous améliorer en vous donnant des conseils. Ce qui va être fourni: Un laptop avec les plus récents outils Visual Studio et SQL Server Express.  Si vous avez besoin d'outils particuliers veuillez apporter votre propre laptop. Ce que vous devez amener: Dans tous les cas assurez vous d'avoir une clé USB avec votre présentation PowerPoint et votre code. Vote du publique: À la fin de la soirée le publique dans la salle vont voter et des prix seront remis aux meilleures présentations (1 par participant, voir la liste ci-haut). Le gagnant aura la possibilité de faire une présentation complète d'une heure la prochaine saison.

    Read the article

  • Cutting-Edge Demos Coming to Collaborate12

    - by mvaughan
    Normal 0 false false false EN-US JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:Calibri; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} By Kathy Miedema, Oracle Applications User Experience Are you building your Collaborate 2012 agenda? Leave room for a stop at the demogrounds while you’re in Las Vegas from April 22-26. In addition to several presentations on the Oracle user experience, the Applications User Experience (UX) team will be on the demo grounds with a new eye-tracking tool, as well as demos that showcase new user experience designs. Check out our cutting-edge technology, which we use to obtain feedback that helps improve the user experience of Oracle applications, and see what our next-generation designs are in the HCM and FIN user experiences.  Normal 0 false false false EN-US JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:Calibri; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} Photo by Martin Taylor – Oracle Applications User Experience An Apps UX team member demonstrates what happens during an eye-tracking test. The dots on the screen show were test participants were looking and how long they spent at each point in the page. The UX team will also be staffing an on-site lab at Collaborate. At on-site labs, conference participants can sign up to join customer feedback sessions on several different kinds of work flow designs, from HCM to FIN to CRM to mobile. The feedback UX team members collect helps inform and fine-tune the user experiences being designed for next-generation applications. At Collaborate12, for example, user experience designs around Help and organizational charts will be tested for usability. The Apps UX team brings on-site labs to many major user group conferences, including OpenWorld 2012 in October in San Francisco. Stay tuned to find out when our recruiters are ready to sign up participants, or leave a comment below to find out whether an on-site lab will be at your next conference. For information on the following presentations, which will be delivered by Apps UX team members, check the Usable Apps Events page. • The Fusion Applications User Experience: Transforming Work into Insight • Customizations Under the Covers – Making Fusion Applications Your Own • OAUG Fusion Middleware SIG (FMWSIG) • 18 Months with Fusion Applications – Stories From The Trenhes • PeopleTools Tips and Techniques

    Read the article

  • FLEX/BISON : Why my rule is not regonized ?

    - by Natim
    Hi, I am trying to do a little exercice in FLEX and BISON. Here is the code I wrote : calc_pol.y %{ #define YYSTYPE double #include "calc_pol.tab.h" #include <math.h> #include <stdlib.h> %} %start line %token NOMBRE %token FIN %% line: exp '\n' { printf("\t%.2lf\n", $1); }; exp: exp exp '+' { $$ = $1 + $2 ;} | exp exp '-' { $$ = $1 - $2 ;} | exp exp '*' { $$ = $1 * $2 ;} | exp exp '/' { $$ = $1 / $2 ;} | exp exp '^' { $$ = pow($1, $2) ;} | NOMBRE; %% calc_pol.l %{ #include "calc_pol.tab.h" #include <stdlib.h> #include <stdio.h> extern YYSTYPE yylval; %} blancs [ \t]+ chiffre [0-9] entier [+-]?[1-9][0-9]* | 0 reel {entier}('.'{entier})? %% {blancs} {reel} { yylval = atof(yytext); return NOMBRE; } \n { return FIN; } . { return yytext[0]; } %% Makefile all: calc_pol.tab.c lex.yy.c gcc -o calc_pol $< -ly -lfl -lm calc_pol.tab.c: calc_pol.y bison -d calc_pol.y lex.yy.c: calc_pol.l flex calc_pol.l Do you have any idea of what's wrong ? Thanks Edited: The error message is flex calc_pol.l: calc_pol.l:18: règle non reconnue Line 18 is the line beginning with {reel}, and the error message translates to English as "unrecognized rule".

    Read the article

  • Asp.net MVC Calling ActionLink in Codebehind

    - by SSA
    I am new to asp.net and MVC, so please go easy on me. :) I have successfully made a small MVC application. There is a database that contains a table named "Entry" and I have made Controllers for this. Also I have a view for Details and list. This works fin. My problem is in my index page. (not the view Index, but the frontpage). There I dynamically build a TreeView as a menu, with some Categories. In this menu there is under the categories there is my Entries from the database. They show up fin. I insert the entries as a TreeNode what holds the entry id and so forth. What I want is: that the entries in my treeview work as a link to the Detail view of the Entry. So if I click on a entry in the TreeView it will show the Detail page of this Entry. But I can't make it work. How to I use the <%= Html.ActionLink() % in codebehind? Or is it this the wrong way? If calling the view or controller in codebehind is the wrong way to do it. Then how? Thanks in advance.

    Read the article

  • NHibernate 2.1 MsSql2000Dialect error

    - by Daniel Dolz
    Hi. I had an old (but great) app using NHibernate 1.0.2. Worked like a charm. But then I decided to upgrade to NHibernate 2.1.2. Had to change some stuff, worked great also. Problem is, I founded out that new version works in some machines and do not work in others. What the heck? Thinking a while, I discovered that it only works in pcs with SQL 2000 installed!! previous version used to works everywhere.... Check out a piece of my exception, it has to do with mssql2000Dialect NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) Could you help? Thanks!!!!

    Read the article

  • Trying to parse OpenCV YAML ouput with yaml-cpp

    - by Kenn Sebesta
    I've got a series of OpenCv generated YAML files and would like to parse them with yaml-cpp I'm doing okay on simple stuff, but the matrix representation is proving difficult. # Center of table tableCenter: !!opencv-matrix rows: 1 cols: 2 dt: f data: [ 240, 240] This should map into the vector 240 240 with type float. My code looks like: #include "yaml.h" #include <fstream> #include <string> struct Matrix { int x; }; void operator >> (const YAML::Node& node, Matrix& matrix) { unsigned rows; node["rows"] >> rows; } int main() { std::ifstream fin("monsters.yaml"); YAML::Parser parser(fin); YAML::Node doc; Matrix m; doc["tableCenter"] >> m; return 0; } But I get terminate called after throwing an instance of 'YAML::BadDereference' what(): yaml-cpp: error at line 0, column 0: bad dereference Abort trap I searched around for some documentation for yaml-cpp, but there doesn't seem to be any, aside from a short introductory example on parsing and emitting. Unfortunately, neither of these two help in this particular circumstance. As I understand, the !! indicate that this is a user-defined type, but I don't see with yaml-cpp how to parse that.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >