The George B. Moody PhysioNet/Computing in Cardiology Challenge 2022 focused on detecting the presence or absence of murmurs from multiple auscultation locations heart sound recordings. Our team, MetaHeart, proposed a novel approach to detect heart murmurs by combing residual neural network and class distinguished focal loss. Firstly, the phonocardiogram (PCG) recordings were converted to the time-frequency Mel spectrograms to obtain a richer representation of cardiac mechanical activity. Secondly, a modified residual neural network with 28 layers was designed to extract the complex pathological patterns of heart murmurs and it adopted Mel spectrograms as input. Thirdly, a joint loss combing class distinguished focal loss and center loss was designed in our approach. The class distinguished focal loss can give different degrees of attention to misclassified samples from different categories. The center loss simultaneously learns a center for deep features of each class and penalizes the distances between the deep features and their corresponding class centers. The 15 seconds recordings from five corresponding auscultation locations were preprocessed and concatenated as model inputs for end-to-end training, and the prediction probabilities of 3 murmurs categories or 2 outcome categories were outputs. Finally, our proposed algorithms were evaluated on the hidden validation set, and our classifiers received a weighted accuracy score of 0.73, and an outcome score of 9180 (ranked 13th, and 6th out of over 50 teams) for murmur detection task and outcome classification task, respectively.